Skip to content
Snippets Groups Projects
Unverified Commit d7fd4bd6 authored by Éloïs's avatar Éloïs
Browse files

expend TestUser typage

parent ca4d7c46
Branches
Tags
3 merge requests!1220Stable/ws2p v1.1 trymerge,!1208Stable/ws2p v1.1,!1195[enh] #1193 Refactoring test user.js to TestUser.ts
...@@ -183,7 +183,7 @@ export class TestUser { ...@@ -183,7 +183,7 @@ export class TestUser {
}; };
}; };
public async sendMoney(amount:number, recipient:string, comment?:string) { public async sendMoney(amount:number, recipient:TestUser, comment?:string) {
const raw = await this.prepareITX(amount, recipient, comment) const raw = await this.prepareITX(amount, recipient, comment)
await this.sendTX(raw) await this.sendTX(raw)
} }
......
...@@ -8,6 +8,7 @@ import { ...@@ -8,6 +8,7 @@ import {
} from "./tools/toolbox" } from "./tools/toolbox"
import {WS2PCluster} from "../../app/modules/ws2p/lib/WS2PCluster" import {WS2PCluster} from "../../app/modules/ws2p/lib/WS2PCluster"
import {WS2PConstants} from "../../app/modules/ws2p/lib/constants" import {WS2PConstants} from "../../app/modules/ws2p/lib/constants"
import { TestUser } from './tools/TestUser';
const assert = require('assert') const assert = require('assert')
...@@ -18,7 +19,7 @@ describe("WS2P cluster", function() { ...@@ -18,7 +19,7 @@ describe("WS2P cluster", function() {
const now = 1500000000 const now = 1500000000
let s1:TestingServer, s2:TestingServer, s3:TestingServer let s1:TestingServer, s2:TestingServer, s3:TestingServer
let cat:any, tac:any, toc:any let cat:TestUser, tac:TestUser, toc:TestUser
const catKeyring = { pub: 'HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd', sec: '51w4fEShBk1jCMauWu4mLpmDVfHksKmWcygpxriqCEZizbtERA6de4STKRkQBpxmMUwsKXRjSzuQ8ECwmqN1u2DP'} const catKeyring = { pub: 'HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd', sec: '51w4fEShBk1jCMauWu4mLpmDVfHksKmWcygpxriqCEZizbtERA6de4STKRkQBpxmMUwsKXRjSzuQ8ECwmqN1u2DP'}
const tacKeyring = { pub: '2LvDg21dVXvetTD9GdkPLURavLYEqP3whauvPWX4c2qc', sec: '2HuRLWgKgED1bVio1tdpeXrf7zuUszv1yPHDsDj7kcMC4rVSN9RC58ogjtKNfTbH1eFz7rn38U1PywNs3m6Q7UxE'} const tacKeyring = { pub: '2LvDg21dVXvetTD9GdkPLURavLYEqP3whauvPWX4c2qc', sec: '2HuRLWgKgED1bVio1tdpeXrf7zuUszv1yPHDsDj7kcMC4rVSN9RC58ogjtKNfTbH1eFz7rn38U1PywNs3m6Q7UxE'}
const tocKeyring = { pub: 'DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo', sec: '64EYRvdPpTfLGGmaX5nijLXRqWXaVz8r1Z1GtaahXwVSJGQRn7tqkxLb288zwSYzELMEG5ZhXSBYSxsTsz1m9y8F'} const tocKeyring = { pub: 'DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo', sec: '64EYRvdPpTfLGGmaX5nijLXRqWXaVz8r1Z1GtaahXwVSJGQRn7tqkxLb288zwSYzELMEG5ZhXSBYSxsTsz1m9y8F'}
......
import { TestUser } from './tools/TestUser';
import {simpleTestingConf, simpleTestingServer, simpleUser, simpleWS2PNetwork, TestingServer} from "./tools/toolbox" import {simpleTestingConf, simpleTestingServer, simpleUser, simpleWS2PNetwork, TestingServer} from "./tools/toolbox"
import {WS2PConstants} from "../../app/modules/ws2p/lib/constants" import {WS2PConstants} from "../../app/modules/ws2p/lib/constants"
...@@ -10,7 +11,7 @@ describe("WS2P doc sharing", function() { ...@@ -10,7 +11,7 @@ describe("WS2P doc sharing", function() {
const now = 1500000000 const now = 1500000000
let s1:TestingServer, s2:TestingServer, wss:any let s1:TestingServer, s2:TestingServer, wss:any
let cat:any, tac:any, toc:any let cat:TestUser, tac:TestUser, toc:TestUser
const catKeyring = { pub: 'HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd', sec: '51w4fEShBk1jCMauWu4mLpmDVfHksKmWcygpxriqCEZizbtERA6de4STKRkQBpxmMUwsKXRjSzuQ8ECwmqN1u2DP'} const catKeyring = { pub: 'HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd', sec: '51w4fEShBk1jCMauWu4mLpmDVfHksKmWcygpxriqCEZizbtERA6de4STKRkQBpxmMUwsKXRjSzuQ8ECwmqN1u2DP'}
const tacKeyring = { pub: '2LvDg21dVXvetTD9GdkPLURavLYEqP3whauvPWX4c2qc', sec: '2HuRLWgKgED1bVio1tdpeXrf7zuUszv1yPHDsDj7kcMC4rVSN9RC58ogjtKNfTbH1eFz7rn38U1PywNs3m6Q7UxE'} const tacKeyring = { pub: '2LvDg21dVXvetTD9GdkPLURavLYEqP3whauvPWX4c2qc', sec: '2HuRLWgKgED1bVio1tdpeXrf7zuUszv1yPHDsDj7kcMC4rVSN9RC58ogjtKNfTbH1eFz7rn38U1PywNs3m6Q7UxE'}
const tocKeyring = { pub: 'DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo', sec: '64EYRvdPpTfLGGmaX5nijLXRqWXaVz8r1Z1GtaahXwVSJGQRn7tqkxLb288zwSYzELMEG5ZhXSBYSxsTsz1m9y8F'} const tocKeyring = { pub: 'DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo', sec: '64EYRvdPpTfLGGmaX5nijLXRqWXaVz8r1Z1GtaahXwVSJGQRn7tqkxLb288zwSYzELMEG5ZhXSBYSxsTsz1m9y8F'}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment