X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-nsfw.ts;h=65e9c8730b9a80cbd51487d4453978965569bcc8;hb=b1dbb9fefc870a90b25f5c0153589f45c9e75e3e;hp=b5d183d6278deabca0acea74c4390a238d2846e0;hpb=4c7e60bc17ee5830399bac4aa273356903421b4c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts index b5d183d62..65e9c8730 100644 --- a/server/tests/api/videos/video-nsfw.ts +++ b/server/tests/api/videos/video-nsfw.ts @@ -1,12 +1,9 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' -import * as chai from 'chai' -import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' +import { expect } from 'chai' +import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' import { BooleanBothQuery, CustomConfig, ResultList, Video, VideosOverview } from '@shared/models' -const expect = chai.expect - function createOverviewRes (overview: VideosOverview) { const videos = overview.categories[0].videos return { data: videos, total: videos.length } @@ -136,7 +133,7 @@ describe('Test video NSFW policy', function () { it('Should create a user having the default nsfw policy', async function () { const username = 'user1' const password = 'my super password' - await server.users.create({ username: username, password: password }) + await server.users.create({ username, password }) userAccessToken = await server.login.getAccessToken({ username, password })