/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import * as chai from 'chai'
+import { expect } from 'chai'
import { basename } from 'path'
import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants'
import { testFileExistsOrNot, testImage } from '@server/tests/shared'
waitJobs
} from '@shared/server-commands'
-const expect = chai.expect
-
async function findChannel (server: PeerTubeServer, channelId: number) {
const body = await server.channels.list({ sort: '-name' })
this.timeout(10000)
for (const server of servers) {
- const channelURI = 'second_video_channel@localhost:' + servers[0].port
+ const channelURI = 'second_video_channel@' + servers[0].host
const { total, data } = await server.videos.listByChannel({ handle: channelURI })
expect(total).to.equal(1)
for (const server of servers) {
{
- const secondChannelURI = 'second_video_channel@localhost:' + servers[0].port
+ const secondChannelURI = 'second_video_channel@' + servers[0].host
const { total } = await server.videos.listByChannel({ handle: secondChannelURI })
expect(total).to.equal(0)
}
{
- const channelURI = 'root_channel@localhost:' + servers[0].port
+ const channelURI = 'root_channel@' + servers[0].host
const { total, data } = await server.videos.listByChannel({ handle: channelURI })
expect(total).to.equal(1)