mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
cleanup event listeners
This commit is contained in:
@@ -345,10 +345,10 @@ describe('Connection', function() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('should emit disconnected event with code 1006 (CLOSE_ABNORMAL)', function(done) {
|
it('should emit disconnected event with code 1006 (CLOSE_ABNORMAL)', function(done) {
|
||||||
this.api.once('error', error => {
|
this.api.connection.once('error', error => {
|
||||||
done(new Error('should not throw error, got ' + String(error)))
|
done(new Error('should not throw error, got ' + String(error)))
|
||||||
})
|
})
|
||||||
this.api.once('disconnected', code => {
|
this.api.connection.once('disconnected', code => {
|
||||||
assert.strictEqual(code, 1006)
|
assert.strictEqual(code, 1006)
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user