Skip to content

Commit

Permalink
Fix live tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Jul 31, 2023
1 parent 257df4c commit 5e1ced7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/tests/api/live/live-socket-messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -117,15 +117,15 @@ 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 })
}

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

Expand Down

0 comments on commit 5e1ced7

Please sign in to comment.