mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-05 08:48:14 +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",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@types/lodash": "^4.14.136",
|
||||
"@types/ws": "^7.2.0",
|
||||
"bignumber.js": "^9.0.0",
|
||||
"bip32": "^2.0.6",
|
||||
"bip39": "^3.0.4",
|
||||
@@ -23,9 +21,11 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.2.21",
|
||||
"@types/lodash": "^4.14.136",
|
||||
"@types/mocha": "^9.0.0",
|
||||
"@types/node": "^16.4.3",
|
||||
"@types/puppeteer": "5.4.4",
|
||||
"@types/ws": "^8.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.30.0",
|
||||
"@typescript-eslint/parser": "^4.0.0",
|
||||
"@xrplf/eslint-config": "^1.4.0",
|
||||
@@ -878,7 +878,8 @@
|
||||
"node_modules/@types/lodash": {
|
||||
"version": "4.14.175",
|
||||
"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": {
|
||||
"version": "9.0.0",
|
||||
@@ -889,7 +890,8 @@
|
||||
"node_modules/@types/node": {
|
||||
"version": "16.10.2",
|
||||
"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": {
|
||||
"version": "5.4.4",
|
||||
@@ -901,9 +903,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/ws": {
|
||||
"version": "7.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",
|
||||
"integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==",
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz",
|
||||
"integrity": "sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
@@ -9151,7 +9154,8 @@
|
||||
"@types/lodash": {
|
||||
"version": "4.14.175",
|
||||
"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": {
|
||||
"version": "9.0.0",
|
||||
@@ -9162,7 +9166,8 @@
|
||||
"@types/node": {
|
||||
"version": "16.10.2",
|
||||
"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": {
|
||||
"version": "5.4.4",
|
||||
@@ -9174,9 +9179,10 @@
|
||||
}
|
||||
},
|
||||
"@types/ws": {
|
||||
"version": "7.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",
|
||||
"integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==",
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz",
|
||||
"integrity": "sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
"ws": "./dist/npm/client/wsWrapper.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/lodash": "^4.14.136",
|
||||
"@types/ws": "^7.2.0",
|
||||
"bignumber.js": "^9.0.0",
|
||||
"bip32": "^2.0.6",
|
||||
"bip39": "^3.0.4",
|
||||
@@ -35,6 +33,8 @@
|
||||
"elliptic": "^6.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/lodash": "^4.14.136",
|
||||
"@types/ws": "^8.2.0",
|
||||
"@types/chai": "^4.2.21",
|
||||
"@types/mocha": "^9.0.0",
|
||||
"@types/node": "^16.4.3",
|
||||
|
||||
@@ -441,7 +441,9 @@ export class Connection extends EventEmitter {
|
||||
|
||||
this.clearHeartbeatInterval()
|
||||
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 = null
|
||||
|
||||
@@ -8,7 +8,7 @@ import { convertStringToHex } from 'xrpl-local/utils'
|
||||
import { multisign } from 'xrpl-local/wallet/signer'
|
||||
|
||||
import serverUrl from './serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from './setup'
|
||||
import { setupClient, teardownClient } from './setup'
|
||||
import {
|
||||
generateFundedWallet,
|
||||
ledgerAccept,
|
||||
@@ -22,7 +22,6 @@ const TIMEOUT = 20000
|
||||
describe('integration tests', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import _ from 'lodash'
|
||||
import { AccountSet, convertStringToHex } from 'xrpl-local'
|
||||
|
||||
import serverUrl from './serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from './setup'
|
||||
import { setupClient, teardownClient } from './setup'
|
||||
import { ledgerAccept } from './utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -15,7 +15,6 @@ const TIMEOUT = 60000
|
||||
describe('reliable submission', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { AccountChannelsRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('account_channels', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { AccountCurrenciesRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('account_currencies', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { AccountInfoRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('account_info', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { AccountLinesRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('account_lines', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { AccountObjectsRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('account_objects', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { AccountOffersRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('account_offers', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { AccountTxRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('account_tx', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { BookOffersRequest, BookOffersResponse } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('book_offers', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { ChannelVerifyRequest, ChannelVerifyResponse } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('channel_verify', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { DepositAuthorizedRequest, DepositAuthorizedResponse } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('deposit_authorized', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { FeeRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('fee', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { GatewayBalancesRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('gateway_balances', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { LedgerRequest, LedgerResponse } from 'xrpl-local'
|
||||
import { Ledger } from 'xrpl-local/models/ledger'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('ledger', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { LedgerClosedRequest, LedgerClosedResponse } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('ledger_closed', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { LedgerCurrentResponse, LedgerCurrentRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('ledger_current', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { LedgerDataRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('ledger_data', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { LedgerEntryRequest, LedgerEntryResponse } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('ledger_entry', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { NoRippleCheckRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('noripple_check', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, ledgerAccept, subscribeDone } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -18,7 +18,6 @@ const TIMEOUT = 20000
|
||||
describe('path_find', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
@@ -67,7 +66,6 @@ describe('path_find', function () {
|
||||
this.client.request(pathFind).then((response) => {
|
||||
const expectedResponse: PathFindResponse = {
|
||||
id: response.id,
|
||||
status: 'success',
|
||||
type: 'response',
|
||||
result: {
|
||||
alternatives: response.result.alternatives,
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { RipplePathFindRequest, RipplePathFindResponse } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('ripple_path_find', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { ServerInfoRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('server_info', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { ServerStateRequest } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('server_state', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
import { convertStringToHex } from 'xrpl-local/utils'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { ledgerAccept, verifySubmittedTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -22,7 +22,6 @@ const { hashSignedTx } = hashes
|
||||
describe('submit', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import { convertStringToHex } from 'xrpl-local/utils'
|
||||
import { multisign } from 'xrpl-local/wallet/signer'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import {
|
||||
generateFundedWallet,
|
||||
ledgerAccept,
|
||||
@@ -30,7 +30,6 @@ const { hashSignedTx } = hashes
|
||||
describe('submit_multisigned', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
import { StreamType } from 'xrpl-local/models/common'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { ledgerAccept, subscribeDone, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -39,7 +39,6 @@ async function createTxHandlerTest(
|
||||
}
|
||||
|
||||
client.request(request).then((response) => {
|
||||
assert.equal(response.status, 'success')
|
||||
assert.equal(response.type, 'response')
|
||||
assert.deepEqual(response.result, {})
|
||||
})
|
||||
@@ -48,7 +47,6 @@ async function createTxHandlerTest(
|
||||
describe('subscribe', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { AccountSet, hashes, SubmitResponse, TxResponse } from 'xrpl-local'
|
||||
import { convertStringToHex } from 'xrpl-local/utils'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -14,7 +14,6 @@ const { hashSignedTx } = hashes
|
||||
describe('tx', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { Client } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('Utility method integration tests', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -1,21 +1,12 @@
|
||||
import { generateXAddress, Client, Wallet } from 'xrpl-local'
|
||||
import { Client, Wallet } from 'xrpl-local'
|
||||
|
||||
import serverUrl from './serverUrl'
|
||||
import { fundAccount, ledgerAccept } from './utils'
|
||||
import { fundAccount } from './utils'
|
||||
|
||||
export async function teardownClient(this: Mocha.Context): Promise<void> {
|
||||
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(
|
||||
this: Mocha.Context,
|
||||
server = serverUrl,
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import { AccountDelete } from 'xrpl-local/models/transactions'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, ledgerAccept, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('AccountDelete', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import { AccountSet } from 'xrpl-local/models/transactions'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('AccountSet', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { CheckCreate, CheckCancel } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('CheckCancel', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { CheckCreate, CheckCash } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('CheckCash', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { CheckCreate } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('CheckCreate', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import { DepositPreauth, Wallet } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { fundAccount, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('DepositPreauth', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { EscrowCancel, EscrowCreate } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, getXRPBalance, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('EscrowCancel', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { EscrowCreate } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('EscrowCreate', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { EscrowFinish, EscrowCreate } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, getXRPBalance, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('EscrowFinish', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { OfferCreate, OfferCancel } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('OfferCancel', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash'
|
||||
import { OfferCreate } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const TIMEOUT = 20000
|
||||
describe('OfferCreate', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import { Payment } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('Payment', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import { PaymentChannelCreate, hashes, PaymentChannelClaim } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const { hashPaymentChannel } = hashes
|
||||
describe('PaymentChannelClaim', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import { PaymentChannelCreate } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('PaymentChannelCreate', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import { PaymentChannelCreate, hashes, PaymentChannelFund } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -13,7 +13,6 @@ const { hashPaymentChannel } = hashes
|
||||
describe('PaymentChannelFund', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import { SignerListSet } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('SignerListSet', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import { TrustSet } from 'xrpl-local'
|
||||
|
||||
import serverUrl from '../serverUrl'
|
||||
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
|
||||
import { setupClient, teardownClient } from '../setup'
|
||||
import { generateFundedWallet, testTransaction } from '../utils'
|
||||
|
||||
// how long before each test case times out
|
||||
@@ -12,7 +12,6 @@ const TIMEOUT = 20000
|
||||
describe('TrustSet', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
before(suiteClientSetup)
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
afterEach(teardownClient)
|
||||
|
||||
|
||||
@@ -36,8 +36,9 @@ export async function fundAccount(
|
||||
console.log(response)
|
||||
assert.fail(`Response not successful, ${response.result.engine_result}`)
|
||||
}
|
||||
|
||||
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> {
|
||||
|
||||
Reference in New Issue
Block a user