From 5e1ced7067893d6601ef7f035d35f7870ab1e91d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 31 Jul 2023 09:31:28 +0200 Subject: Fix live tests --- server/tests/api/live/live-socket-messages.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server') diff --git a/server/tests/api/live/live-socket-messages.ts b/server/tests/api/live/live-socket-messages.ts index 62b7a6d22..0cccd1594 100644 --- a/server/tests/api/live/live-socket-messages.ts +++ b/server/tests/api/live/live-socket-messages.ts @@ -2,7 +2,7 @@ import { expect } from 'chai' import { wait } from '@shared/core-utils' -import { VideoPrivacy, VideoState } from '@shared/models' +import { LiveVideoEventPayload, VideoPrivacy, VideoState } from '@shared/models' import { cleanupTests, createMultipleServers, @@ -117,7 +117,7 @@ describe('Test live socket messages', function () { const videoId = await servers[0].videos.getId({ uuid: liveVideoUUID }) const localSocket = servers[0].socketIO.getLiveNotificationSocket() - localSocket.on('views-change', data => { localLastVideoViews = data.views }) + localSocket.on('views-change', (data: LiveVideoEventPayload) => { localLastVideoViews = data.viewers }) localSocket.emit('subscribe', { videoId }) } @@ -125,7 +125,7 @@ describe('Test live socket messages', function () { const videoId = await servers[1].videos.getId({ uuid: liveVideoUUID }) const remoteSocket = servers[1].socketIO.getLiveNotificationSocket() - remoteSocket.on('views-change', data => { remoteLastVideoViews = data.views }) + remoteSocket.on('views-change', (data: LiveVideoEventPayload) => { remoteLastVideoViews = data.viewers }) remoteSocket.emit('subscribe', { videoId }) } -- cgit v1.2.3