mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
fix broadcast tests
This commit is contained in:
@@ -16,9 +16,7 @@ describe('BroadcastClient', function () {
|
||||
afterEach(teardownClient)
|
||||
|
||||
it('base', async function () {
|
||||
this.mocks.forEach((mock) => {
|
||||
mock.addResponse('server_info', rippled.server_info.normal)
|
||||
})
|
||||
this.mockRippled.addResponse('server_info', rippled.server_info.normal)
|
||||
assert(this.client.isConnected())
|
||||
this.client
|
||||
.request({ command: 'server_info' })
|
||||
@@ -29,9 +27,7 @@ describe('BroadcastClient', function () {
|
||||
|
||||
it('error propagation', function (done) {
|
||||
const data = { error: 'type', error_message: 'info' }
|
||||
this.mocks.forEach((mock) => {
|
||||
mock.addResponse('echo', data)
|
||||
})
|
||||
this.mockRippled.addResponse('echo', data)
|
||||
this.client.once('error', (type, info) => {
|
||||
assert.strictEqual(type, 'type')
|
||||
assert.strictEqual(info, 'info')
|
||||
|
||||
Reference in New Issue
Block a user