/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import 'mocha'
-import * as chai from 'chai'
+import { expect } from 'chai'
+import { wait } from '@shared/core-utils'
+import { VideoPrivacy } from '@shared/models'
import {
cleanupTests,
createSingleServer,
PeerTubeServer,
SearchCommand,
setAccessTokensToServers,
+ setDefaultAccountAvatar,
+ setDefaultChannelAvatar,
setDefaultVideoChannel,
- stopFfmpeg,
- wait
+ stopFfmpeg
} from '@shared/server-commands'
-import { VideoPrivacy } from '@shared/models'
-
-const expect = chai.expect
describe('Test videos search', function () {
let server: PeerTubeServer
await setAccessTokensToServers([ server, remoteServer ])
await setDefaultVideoChannel([ server, remoteServer ])
+ await setDefaultChannelAvatar(server)
+ await setDefaultAccountAvatar(servers)
{
const attributes1 = {
licence: 2,
language: 'en'
}
- await server.videos.upload({ attributes: attributes })
+ await server.videos.upload({ attributes })
await server.videos.upload({ attributes: { ...attributes, name: attributes.name + ' duplicate' } })
}
licence: 3,
language: 'pl'
}
- await server.videos.upload({ attributes: attributes })
+ await server.videos.upload({ attributes })
}
{
const search = {
categoryOneOf: [ 3 ]
}
- const body = await command.advancedVideoSearch({ search: search })
+ const body = await command.advancedVideoSearch({ search })
expect(body.total).to.equal(1)