mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
deps/test: update @types/ws and fix flaky tests (#1724)
* build(deps): bump @types/ws from 7.4.7 to 8.2.0 Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 7.4.7 to 8.2.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws) --- updated-dependencies: - dependency-name: "@types/ws" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * resolve linter error * fix types/ws * fix flaky integration tests - tefPAST_SEQ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nathan Nichols <natenichols@cox.net>
This commit is contained in:
30
package-lock.json
generated
30
package-lock.json
generated
@@ -9,8 +9,6 @@
|
|||||||
"version": "2.0.0-beta.4",
|
"version": "2.0.0-beta.4",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/lodash": "^4.14.136",
|
|
||||||
"@types/ws": "^7.2.0",
|
|
||||||
"bignumber.js": "^9.0.0",
|
"bignumber.js": "^9.0.0",
|
||||||
"bip32": "^2.0.6",
|
"bip32": "^2.0.6",
|
||||||
"bip39": "^3.0.4",
|
"bip39": "^3.0.4",
|
||||||
@@ -23,9 +21,11 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "^4.2.21",
|
"@types/chai": "^4.2.21",
|
||||||
|
"@types/lodash": "^4.14.136",
|
||||||
"@types/mocha": "^9.0.0",
|
"@types/mocha": "^9.0.0",
|
||||||
"@types/node": "^16.4.3",
|
"@types/node": "^16.4.3",
|
||||||
"@types/puppeteer": "5.4.4",
|
"@types/puppeteer": "5.4.4",
|
||||||
|
"@types/ws": "^8.2.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.30.0",
|
"@typescript-eslint/eslint-plugin": "^4.30.0",
|
||||||
"@typescript-eslint/parser": "^4.0.0",
|
"@typescript-eslint/parser": "^4.0.0",
|
||||||
"@xrplf/eslint-config": "^1.4.0",
|
"@xrplf/eslint-config": "^1.4.0",
|
||||||
@@ -878,7 +878,8 @@
|
|||||||
"node_modules/@types/lodash": {
|
"node_modules/@types/lodash": {
|
||||||
"version": "4.14.175",
|
"version": "4.14.175",
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.175.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.175.tgz",
|
||||||
"integrity": "sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw=="
|
"integrity": "sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/mocha": {
|
"node_modules/@types/mocha": {
|
||||||
"version": "9.0.0",
|
"version": "9.0.0",
|
||||||
@@ -889,7 +890,8 @@
|
|||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "16.10.2",
|
"version": "16.10.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.2.tgz",
|
||||||
"integrity": "sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ=="
|
"integrity": "sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/puppeteer": {
|
"node_modules/@types/puppeteer": {
|
||||||
"version": "5.4.4",
|
"version": "5.4.4",
|
||||||
@@ -901,9 +903,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/ws": {
|
"node_modules/@types/ws": {
|
||||||
"version": "7.4.7",
|
"version": "8.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz",
|
||||||
"integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==",
|
"integrity": "sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
@@ -9151,7 +9154,8 @@
|
|||||||
"@types/lodash": {
|
"@types/lodash": {
|
||||||
"version": "4.14.175",
|
"version": "4.14.175",
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.175.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.175.tgz",
|
||||||
"integrity": "sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw=="
|
"integrity": "sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/mocha": {
|
"@types/mocha": {
|
||||||
"version": "9.0.0",
|
"version": "9.0.0",
|
||||||
@@ -9162,7 +9166,8 @@
|
|||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "16.10.2",
|
"version": "16.10.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.2.tgz",
|
||||||
"integrity": "sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ=="
|
"integrity": "sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/puppeteer": {
|
"@types/puppeteer": {
|
||||||
"version": "5.4.4",
|
"version": "5.4.4",
|
||||||
@@ -9174,9 +9179,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/ws": {
|
"@types/ws": {
|
||||||
"version": "7.4.7",
|
"version": "8.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz",
|
||||||
"integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==",
|
"integrity": "sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
"ws": "./dist/npm/client/wsWrapper.js"
|
"ws": "./dist/npm/client/wsWrapper.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/lodash": "^4.14.136",
|
|
||||||
"@types/ws": "^7.2.0",
|
|
||||||
"bignumber.js": "^9.0.0",
|
"bignumber.js": "^9.0.0",
|
||||||
"bip32": "^2.0.6",
|
"bip32": "^2.0.6",
|
||||||
"bip39": "^3.0.4",
|
"bip39": "^3.0.4",
|
||||||
@@ -35,6 +33,8 @@
|
|||||||
"elliptic": "^6.5.4"
|
"elliptic": "^6.5.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/lodash": "^4.14.136",
|
||||||
|
"@types/ws": "^8.2.0",
|
||||||
"@types/chai": "^4.2.21",
|
"@types/chai": "^4.2.21",
|
||||||
"@types/mocha": "^9.0.0",
|
"@types/mocha": "^9.0.0",
|
||||||
"@types/node": "^16.4.3",
|
"@types/node": "^16.4.3",
|
||||||
|
|||||||
@@ -441,7 +441,9 @@ export class Connection extends EventEmitter {
|
|||||||
|
|
||||||
this.clearHeartbeatInterval()
|
this.clearHeartbeatInterval()
|
||||||
this.requestManager.rejectAll(
|
this.requestManager.rejectAll(
|
||||||
new DisconnectedError(`websocket was closed, ${reason}`),
|
new DisconnectedError(
|
||||||
|
`websocket was closed, ${new TextDecoder('utf-8').decode(reason)}`,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
this.ws.removeAllListeners()
|
this.ws.removeAllListeners()
|
||||||
this.ws = null
|
this.ws = null
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { convertStringToHex } from 'xrpl-local/utils'
|
|||||||
import { multisign } from 'xrpl-local/wallet/signer'
|
import { multisign } from 'xrpl-local/wallet/signer'
|
||||||
|
|
||||||
import serverUrl from './serverUrl'
|
import serverUrl from './serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from './setup'
|
import { setupClient, teardownClient } from './setup'
|
||||||
import {
|
import {
|
||||||
generateFundedWallet,
|
generateFundedWallet,
|
||||||
ledgerAccept,
|
ledgerAccept,
|
||||||
@@ -22,7 +22,6 @@ const TIMEOUT = 20000
|
|||||||
describe('integration tests', function () {
|
describe('integration tests', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import _ from 'lodash'
|
|||||||
import { AccountSet, convertStringToHex } from 'xrpl-local'
|
import { AccountSet, convertStringToHex } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from './serverUrl'
|
import serverUrl from './serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from './setup'
|
import { setupClient, teardownClient } from './setup'
|
||||||
import { ledgerAccept } from './utils'
|
import { ledgerAccept } from './utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -15,7 +15,6 @@ const TIMEOUT = 60000
|
|||||||
describe('reliable submission', function () {
|
describe('reliable submission', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { AccountChannelsRequest } from 'xrpl-local'
|
import { AccountChannelsRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('account_channels', function () {
|
describe('account_channels', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { AccountCurrenciesRequest } from 'xrpl-local'
|
import { AccountCurrenciesRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('account_currencies', function () {
|
describe('account_currencies', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { AccountInfoRequest } from 'xrpl-local'
|
import { AccountInfoRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('account_info', function () {
|
describe('account_info', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { AccountLinesRequest } from 'xrpl-local'
|
import { AccountLinesRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('account_lines', function () {
|
describe('account_lines', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { AccountObjectsRequest } from 'xrpl-local'
|
import { AccountObjectsRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('account_objects', function () {
|
describe('account_objects', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { AccountOffersRequest } from 'xrpl-local'
|
import { AccountOffersRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('account_offers', function () {
|
describe('account_offers', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { AccountTxRequest } from 'xrpl-local'
|
import { AccountTxRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('account_tx', function () {
|
describe('account_tx', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { BookOffersRequest, BookOffersResponse } from 'xrpl-local'
|
import { BookOffersRequest, BookOffersResponse } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('book_offers', function () {
|
describe('book_offers', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { ChannelVerifyRequest, ChannelVerifyResponse } from 'xrpl-local'
|
import { ChannelVerifyRequest, ChannelVerifyResponse } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('channel_verify', function () {
|
describe('channel_verify', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { DepositAuthorizedRequest, DepositAuthorizedResponse } from 'xrpl-local'
|
import { DepositAuthorizedRequest, DepositAuthorizedResponse } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet } from '../utils'
|
import { generateFundedWallet } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('deposit_authorized', function () {
|
describe('deposit_authorized', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { FeeRequest } from 'xrpl-local'
|
import { FeeRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('fee', function () {
|
describe('fee', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { GatewayBalancesRequest } from 'xrpl-local'
|
import { GatewayBalancesRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('gateway_balances', function () {
|
describe('gateway_balances', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { LedgerRequest, LedgerResponse } from 'xrpl-local'
|
|||||||
import { Ledger } from 'xrpl-local/models/ledger'
|
import { Ledger } from 'xrpl-local/models/ledger'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('ledger', function () {
|
describe('ledger', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { LedgerClosedRequest, LedgerClosedResponse } from 'xrpl-local'
|
import { LedgerClosedRequest, LedgerClosedResponse } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('ledger_closed', function () {
|
describe('ledger_closed', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { LedgerCurrentResponse, LedgerCurrentRequest } from 'xrpl-local'
|
import { LedgerCurrentResponse, LedgerCurrentRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('ledger_current', function () {
|
describe('ledger_current', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { LedgerDataRequest } from 'xrpl-local'
|
import { LedgerDataRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('ledger_data', function () {
|
describe('ledger_data', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { LedgerEntryRequest, LedgerEntryResponse } from 'xrpl-local'
|
import { LedgerEntryRequest, LedgerEntryResponse } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('ledger_entry', function () {
|
describe('ledger_entry', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { NoRippleCheckRequest } from 'xrpl-local'
|
import { NoRippleCheckRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('noripple_check', function () {
|
describe('noripple_check', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
} from 'xrpl-local'
|
} from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, ledgerAccept, subscribeDone } from '../utils'
|
import { generateFundedWallet, ledgerAccept, subscribeDone } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -18,7 +18,6 @@ const TIMEOUT = 20000
|
|||||||
describe('path_find', function () {
|
describe('path_find', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
@@ -67,7 +66,6 @@ describe('path_find', function () {
|
|||||||
this.client.request(pathFind).then((response) => {
|
this.client.request(pathFind).then((response) => {
|
||||||
const expectedResponse: PathFindResponse = {
|
const expectedResponse: PathFindResponse = {
|
||||||
id: response.id,
|
id: response.id,
|
||||||
status: 'success',
|
|
||||||
type: 'response',
|
type: 'response',
|
||||||
result: {
|
result: {
|
||||||
alternatives: response.result.alternatives,
|
alternatives: response.result.alternatives,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { RipplePathFindRequest, RipplePathFindResponse } from 'xrpl-local'
|
import { RipplePathFindRequest, RipplePathFindResponse } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet } from '../utils'
|
import { generateFundedWallet } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('ripple_path_find', function () {
|
describe('ripple_path_find', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { ServerInfoRequest } from 'xrpl-local'
|
import { ServerInfoRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('server_info', function () {
|
describe('server_info', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { ServerStateRequest } from 'xrpl-local'
|
import { ServerStateRequest } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('server_state', function () {
|
describe('server_state', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
import { convertStringToHex } from 'xrpl-local/utils'
|
import { convertStringToHex } from 'xrpl-local/utils'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { ledgerAccept, verifySubmittedTransaction } from '../utils'
|
import { ledgerAccept, verifySubmittedTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -22,7 +22,6 @@ const { hashSignedTx } = hashes
|
|||||||
describe('submit', function () {
|
describe('submit', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { convertStringToHex } from 'xrpl-local/utils'
|
|||||||
import { multisign } from 'xrpl-local/wallet/signer'
|
import { multisign } from 'xrpl-local/wallet/signer'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import {
|
import {
|
||||||
generateFundedWallet,
|
generateFundedWallet,
|
||||||
ledgerAccept,
|
ledgerAccept,
|
||||||
@@ -30,7 +30,6 @@ const { hashSignedTx } = hashes
|
|||||||
describe('submit_multisigned', function () {
|
describe('submit_multisigned', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
import { StreamType } from 'xrpl-local/models/common'
|
import { StreamType } from 'xrpl-local/models/common'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { ledgerAccept, subscribeDone, testTransaction } from '../utils'
|
import { ledgerAccept, subscribeDone, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -39,7 +39,6 @@ async function createTxHandlerTest(
|
|||||||
}
|
}
|
||||||
|
|
||||||
client.request(request).then((response) => {
|
client.request(request).then((response) => {
|
||||||
assert.equal(response.status, 'success')
|
|
||||||
assert.equal(response.type, 'response')
|
assert.equal(response.type, 'response')
|
||||||
assert.deepEqual(response.result, {})
|
assert.deepEqual(response.result, {})
|
||||||
})
|
})
|
||||||
@@ -48,7 +47,6 @@ async function createTxHandlerTest(
|
|||||||
describe('subscribe', function () {
|
describe('subscribe', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { AccountSet, hashes, SubmitResponse, TxResponse } from 'xrpl-local'
|
|||||||
import { convertStringToHex } from 'xrpl-local/utils'
|
import { convertStringToHex } from 'xrpl-local/utils'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -14,7 +14,6 @@ const { hashSignedTx } = hashes
|
|||||||
describe('tx', function () {
|
describe('tx', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { Client } from 'xrpl-local'
|
import { Client } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
const TIMEOUT = 20000
|
const TIMEOUT = 20000
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('Utility method integration tests', function () {
|
describe('Utility method integration tests', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,12 @@
|
|||||||
import { generateXAddress, Client, Wallet } from 'xrpl-local'
|
import { Client, Wallet } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from './serverUrl'
|
import serverUrl from './serverUrl'
|
||||||
import { fundAccount, ledgerAccept } from './utils'
|
import { fundAccount } from './utils'
|
||||||
|
|
||||||
export async function teardownClient(this: Mocha.Context): Promise<void> {
|
export async function teardownClient(this: Mocha.Context): Promise<void> {
|
||||||
this.client.disconnect()
|
this.client.disconnect()
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function suiteClientSetup(this: Mocha.Context): Promise<void> {
|
|
||||||
this.transactions = []
|
|
||||||
|
|
||||||
await setupClient.bind(this)(serverUrl)
|
|
||||||
await ledgerAccept(this.client)
|
|
||||||
this.newWallet = generateXAddress({ includeClassicAddress: true })
|
|
||||||
await teardownClient.bind(this)()
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function setupClient(
|
export async function setupClient(
|
||||||
this: Mocha.Context,
|
this: Mocha.Context,
|
||||||
server = serverUrl,
|
server = serverUrl,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
|||||||
import { AccountDelete } from 'xrpl-local/models/transactions'
|
import { AccountDelete } from 'xrpl-local/models/transactions'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, ledgerAccept, testTransaction } from '../utils'
|
import { generateFundedWallet, ledgerAccept, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('AccountDelete', function () {
|
describe('AccountDelete', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
|||||||
import { AccountSet } from 'xrpl-local/models/transactions'
|
import { AccountSet } from 'xrpl-local/models/transactions'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { testTransaction } from '../utils'
|
import { testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('AccountSet', function () {
|
describe('AccountSet', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { CheckCreate, CheckCancel } from 'xrpl-local'
|
import { CheckCreate, CheckCancel } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, testTransaction } from '../utils'
|
import { generateFundedWallet, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('CheckCancel', function () {
|
describe('CheckCancel', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { CheckCreate, CheckCash } from 'xrpl-local'
|
import { CheckCreate, CheckCash } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, testTransaction } from '../utils'
|
import { generateFundedWallet, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('CheckCash', function () {
|
describe('CheckCash', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { CheckCreate } from 'xrpl-local'
|
import { CheckCreate } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, testTransaction } from '../utils'
|
import { generateFundedWallet, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('CheckCreate', function () {
|
describe('CheckCreate', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
|||||||
import { DepositPreauth, Wallet } from 'xrpl-local'
|
import { DepositPreauth, Wallet } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { fundAccount, testTransaction } from '../utils'
|
import { fundAccount, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('DepositPreauth', function () {
|
describe('DepositPreauth', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { EscrowCancel, EscrowCreate } from 'xrpl-local'
|
import { EscrowCancel, EscrowCreate } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, getXRPBalance, testTransaction } from '../utils'
|
import { generateFundedWallet, getXRPBalance, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('EscrowCancel', function () {
|
describe('EscrowCancel', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { EscrowCreate } from 'xrpl-local'
|
import { EscrowCreate } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, testTransaction } from '../utils'
|
import { generateFundedWallet, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('EscrowCreate', function () {
|
describe('EscrowCreate', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { EscrowFinish, EscrowCreate } from 'xrpl-local'
|
import { EscrowFinish, EscrowCreate } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, getXRPBalance, testTransaction } from '../utils'
|
import { generateFundedWallet, getXRPBalance, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('EscrowFinish', function () {
|
describe('EscrowFinish', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { OfferCreate, OfferCancel } from 'xrpl-local'
|
import { OfferCreate, OfferCancel } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { testTransaction } from '../utils'
|
import { testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('OfferCancel', function () {
|
describe('OfferCancel', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
|||||||
import { OfferCreate } from 'xrpl-local'
|
import { OfferCreate } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { testTransaction } from '../utils'
|
import { testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
|||||||
describe('OfferCreate', function () {
|
describe('OfferCreate', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
|||||||
import { Payment } from 'xrpl-local'
|
import { Payment } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, testTransaction } from '../utils'
|
import { generateFundedWallet, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('Payment', function () {
|
describe('Payment', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
|||||||
import { PaymentChannelCreate, hashes, PaymentChannelClaim } from 'xrpl-local'
|
import { PaymentChannelCreate, hashes, PaymentChannelClaim } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, testTransaction } from '../utils'
|
import { generateFundedWallet, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const { hashPaymentChannel } = hashes
|
|||||||
describe('PaymentChannelClaim', function () {
|
describe('PaymentChannelClaim', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
|||||||
import { PaymentChannelCreate } from 'xrpl-local'
|
import { PaymentChannelCreate } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, testTransaction } from '../utils'
|
import { generateFundedWallet, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('PaymentChannelCreate', function () {
|
describe('PaymentChannelCreate', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
|||||||
import { PaymentChannelCreate, hashes, PaymentChannelFund } from 'xrpl-local'
|
import { PaymentChannelCreate, hashes, PaymentChannelFund } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, testTransaction } from '../utils'
|
import { generateFundedWallet, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -13,7 +13,6 @@ const { hashPaymentChannel } = hashes
|
|||||||
describe('PaymentChannelFund', function () {
|
describe('PaymentChannelFund', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
|||||||
import { SignerListSet } from 'xrpl-local'
|
import { SignerListSet } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { testTransaction } from '../utils'
|
import { testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('SignerListSet', function () {
|
describe('SignerListSet', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
|||||||
import { TrustSet } from 'xrpl-local'
|
import { TrustSet } from 'xrpl-local'
|
||||||
|
|
||||||
import serverUrl from '../serverUrl'
|
import serverUrl from '../serverUrl'
|
||||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
import { setupClient, teardownClient } from '../setup'
|
||||||
import { generateFundedWallet, testTransaction } from '../utils'
|
import { generateFundedWallet, testTransaction } from '../utils'
|
||||||
|
|
||||||
// how long before each test case times out
|
// how long before each test case times out
|
||||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
|||||||
describe('TrustSet', function () {
|
describe('TrustSet', function () {
|
||||||
this.timeout(TIMEOUT)
|
this.timeout(TIMEOUT)
|
||||||
|
|
||||||
before(suiteClientSetup)
|
|
||||||
beforeEach(_.partial(setupClient, serverUrl))
|
beforeEach(_.partial(setupClient, serverUrl))
|
||||||
afterEach(teardownClient)
|
afterEach(teardownClient)
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,9 @@ export async function fundAccount(
|
|||||||
console.log(response)
|
console.log(response)
|
||||||
assert.fail(`Response not successful, ${response.result.engine_result}`)
|
assert.fail(`Response not successful, ${response.result.engine_result}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
await ledgerAccept(client)
|
await ledgerAccept(client)
|
||||||
|
const signedTx = _.omit(response.result.tx_json, 'hash')
|
||||||
|
await verifySubmittedTransaction(client, signedTx as Transaction)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function generateFundedWallet(client: Client): Promise<Wallet> {
|
export async function generateFundedWallet(client: Client): Promise<Wallet> {
|
||||||
|
|||||||
Reference in New Issue
Block a user