diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-05 10:27:02 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | 99fa5c5badd4f4d35a1d55c80b0102ee1c4e71cd (patch) | |
tree | 0083c74a939a88e2f53af82232120df9d52e29b4 /server/tests/api/check-params | |
parent | bd54ad1953ee0484ba90cf5f588f4c282048f368 (diff) | |
download | PeerTube-99fa5c5badd4f4d35a1d55c80b0102ee1c4e71cd.tar.gz PeerTube-99fa5c5badd4f4d35a1d55c80b0102ee1c4e71cd.tar.zst PeerTube-99fa5c5badd4f4d35a1d55c80b0102ee1c4e71cd.zip |
Fix theater mode
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r-- | server/tests/api/check-params/user-notifications.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts index c6384677e..4aab7eba4 100644 --- a/server/tests/api/check-params/user-notifications.ts +++ b/server/tests/api/check-params/user-notifications.ts | |||
@@ -238,7 +238,7 @@ describe('Test user notifications API validators', function () { | |||
238 | it('Should fail with no token', function (next) { | 238 | it('Should fail with no token', function (next) { |
239 | const socket = io(`http://localhost:${server.port}/user-notifications`, { reconnection: false }) | 239 | const socket = io(`http://localhost:${server.port}/user-notifications`, { reconnection: false }) |
240 | 240 | ||
241 | socket.on('error', () => { | 241 | socket.on('error', function () { |
242 | socket.removeListener('error', this) | 242 | socket.removeListener('error', this) |
243 | socket.disconnect() | 243 | socket.disconnect() |
244 | next() | 244 | next() |
@@ -256,7 +256,7 @@ describe('Test user notifications API validators', function () { | |||
256 | reconnection: false | 256 | reconnection: false |
257 | }) | 257 | }) |
258 | 258 | ||
259 | socket.on('error', () => { | 259 | socket.on('error', function () { |
260 | socket.removeListener('error', this) | 260 | socket.removeListener('error', this) |
261 | socket.disconnect() | 261 | socket.disconnect() |
262 | next() | 262 | next() |
@@ -274,9 +274,11 @@ describe('Test user notifications API validators', function () { | |||
274 | reconnection: false | 274 | reconnection: false |
275 | }) | 275 | }) |
276 | 276 | ||
277 | const errorListener = socket.on('error', err => { | 277 | function errorListener (err) { |
278 | next(new Error('Error in connection: ' + err)) | 278 | next(new Error('Error in connection: ' + err)) |
279 | }) | 279 | } |
280 | |||
281 | socket.on('error', errorListener) | ||
280 | 282 | ||
281 | socket.on('connect', async () => { | 283 | socket.on('connect', async () => { |
282 | socket.removeListener('error', errorListener) | 284 | socket.removeListener('error', errorListener) |