Fix live tests

pull/5914/merge
Chocobozzz 2023-07-31 09:31:28 +02:00
parent 257df4cb56
commit 5e1ced7067
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 3 deletions

View File

@ -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 })
}