mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-19 19:55:51 +00:00
refactor tests for the new connection logic
This commit is contained in:
@@ -19,12 +19,10 @@ export default <TestSuite>{
|
||||
},
|
||||
|
||||
'getFee - high load_factor': async (api, address) => {
|
||||
api.connection._send(
|
||||
JSON.stringify({
|
||||
command: 'config',
|
||||
data: {highLoadFactor: true}
|
||||
})
|
||||
)
|
||||
api.connection.request({
|
||||
command: 'config',
|
||||
data: {highLoadFactor: true}
|
||||
})
|
||||
const fee = await api.getFee()
|
||||
assert.strictEqual(fee, '2')
|
||||
},
|
||||
@@ -33,12 +31,10 @@ export default <TestSuite>{
|
||||
// Ensure that overriding with high maxFeeXRP of '51540' causes no errors.
|
||||
// (fee will actually be 51539.607552)
|
||||
api._maxFeeXRP = '51540'
|
||||
api.connection._send(
|
||||
JSON.stringify({
|
||||
command: 'config',
|
||||
data: {highLoadFactor: true}
|
||||
})
|
||||
)
|
||||
api.connection.request({
|
||||
command: 'config',
|
||||
data: {highLoadFactor: true}
|
||||
})
|
||||
const fee = await api.getFee()
|
||||
assert.strictEqual(fee, '51539.607552')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user