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:
Caleb Kniffen
2023-11-08 18:21:48 -06:00
parent e8f89db00c
commit 134924c395
8 changed files with 23 additions and 150 deletions

View File

@@ -1,4 +1,4 @@
import assert from 'assert'
import { assert } from 'chai'
// how long before each test case times out
const TIMEOUT = 20000

View File

@@ -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,

View File

@@ -1,4 +1,4 @@
import assert from 'assert'
import { assert } from 'chai'
import { Client, SubmitResponse } from '../../src'
import { AccountSet, SignerListSet } from '../../src/models/transactions'

View File

@@ -1,4 +1,4 @@
import assert from 'assert'
import { assert } from 'chai'
import SHAMap, { NodeType } from '../src/utils/hashes/SHAMap'