refactor tests for the new connection logic

This commit is contained in:
Fred K. Schott
2019-12-27 09:30:30 -08:00
parent 20d3be0d1d
commit e3822e6bc3
9 changed files with 117 additions and 131 deletions

View File

@@ -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')
},