From 30cf4f0b001e78dbd520a3c909b003e6c7964f61 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Fri, 27 Dec 2019 12:43:49 -0800 Subject: [PATCH] cleanup event listeners --- test/connection-test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/connection-test.ts b/test/connection-test.ts index a593ced8..ac00d6f6 100644 --- a/test/connection-test.ts +++ b/test/connection-test.ts @@ -345,10 +345,10 @@ describe('Connection', function() { }) 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))) }) - this.api.once('disconnected', code => { + this.api.connection.once('disconnected', code => { assert.strictEqual(code, 1006) done() })