- async function countViews (expected: number) {
- for (const server of servers) {
- const res = await getVideo(server.url, liveVideoId)
- const video: VideoDetails = res.body
-
- expect(video.views).to.equal(expected)
- }
+ async function countViewers (expectedViewers: number) {
+ for (const server of servers) {
+ const video = await server.videos.get({ id: liveVideoId })
+ expect(video.viewers).to.equal(expectedViewers)