mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
feat: remove assert library as a testing dep (#2563)
Right now we have 5 testing library dependencies. This eliminates `assert`. `jest`, `jasmine`, `chai` and `karma` are the remaining ones.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import assert from 'assert'
|
||||
import { assert } from 'chai'
|
||||
|
||||
// how long before each test case times out
|
||||
const TIMEOUT = 20000
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import assert from 'assert'
|
||||
import { assert } from 'chai'
|
||||
|
||||
import {
|
||||
Client,
|
||||
@@ -31,7 +31,7 @@ async function generate_faucet_wallet_and_fund_again(
|
||||
account: wallet.classicAddress,
|
||||
})
|
||||
|
||||
assert.equal(dropsToXrp(info.result.account_data.Balance), balance)
|
||||
assert.equal(dropsToXrp(info.result.account_data.Balance), balance.toString())
|
||||
|
||||
const { balance: newBalance } = await api.fundWallet(wallet, {
|
||||
faucetHost,
|
||||
@@ -45,7 +45,10 @@ async function generate_faucet_wallet_and_fund_again(
|
||||
})
|
||||
|
||||
assert(newBalance > balance)
|
||||
assert.equal(dropsToXrp(afterSent.result.account_data.Balance), newBalance)
|
||||
assert.equal(
|
||||
dropsToXrp(afterSent.result.account_data.Balance),
|
||||
newBalance.toString(),
|
||||
)
|
||||
|
||||
await api.disconnect()
|
||||
}
|
||||
@@ -103,7 +106,10 @@ describe('fundWallet', function () {
|
||||
account: wallet.classicAddress,
|
||||
})
|
||||
|
||||
assert.equal(dropsToXrp(info.result.account_data.Balance), balance)
|
||||
assert.equal(
|
||||
dropsToXrp(info.result.account_data.Balance),
|
||||
balance.toString(),
|
||||
)
|
||||
assert.equal(balance, 10000)
|
||||
|
||||
/*
|
||||
@@ -127,7 +133,7 @@ describe('fundWallet', function () {
|
||||
amount: '2000',
|
||||
usageContext: 'integration-test',
|
||||
})
|
||||
assert.equal(balance, '2000')
|
||||
assert.equal(balance, 2000)
|
||||
assert.notStrictEqual(wallet, undefined)
|
||||
assert(isValidClassicAddress(wallet.classicAddress))
|
||||
assert(isValidXAddress(wallet.getXAddress()))
|
||||
@@ -136,7 +142,10 @@ describe('fundWallet', function () {
|
||||
command: 'account_info',
|
||||
account: wallet.classicAddress,
|
||||
})
|
||||
assert.equal(dropsToXrp(info.result.account_data.Balance), balance)
|
||||
assert.equal(
|
||||
dropsToXrp(info.result.account_data.Balance),
|
||||
balance.toString(),
|
||||
)
|
||||
await api.disconnect()
|
||||
},
|
||||
TIMEOUT,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import assert from 'assert'
|
||||
import { assert } from 'chai'
|
||||
|
||||
import { Client, SubmitResponse } from '../../src'
|
||||
import { AccountSet, SignerListSet } from '../../src/models/transactions'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import assert from 'assert'
|
||||
import { assert } from 'chai'
|
||||
|
||||
import SHAMap, { NodeType } from '../src/utils/hashes/SHAMap'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user