Fix live tests
This commit is contained in:
parent
257df4cb56
commit
5e1ced7067
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import { expect } from 'chai'
|
import { expect } from 'chai'
|
||||||
import { wait } from '@shared/core-utils'
|
import { wait } from '@shared/core-utils'
|
||||||
import { VideoPrivacy, VideoState } from '@shared/models'
|
import { LiveVideoEventPayload, VideoPrivacy, VideoState } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
cleanupTests,
|
cleanupTests,
|
||||||
createMultipleServers,
|
createMultipleServers,
|
||||||
|
@ -117,7 +117,7 @@ describe('Test live socket messages', function () {
|
||||||
const videoId = await servers[0].videos.getId({ uuid: liveVideoUUID })
|
const videoId = await servers[0].videos.getId({ uuid: liveVideoUUID })
|
||||||
|
|
||||||
const localSocket = servers[0].socketIO.getLiveNotificationSocket()
|
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 })
|
localSocket.emit('subscribe', { videoId })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ describe('Test live socket messages', function () {
|
||||||
const videoId = await servers[1].videos.getId({ uuid: liveVideoUUID })
|
const videoId = await servers[1].videos.getId({ uuid: liveVideoUUID })
|
||||||
|
|
||||||
const remoteSocket = servers[1].socketIO.getLiveNotificationSocket()
|
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 })
|
remoteSocket.emit('subscribe', { videoId })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue