From e0faa8ad6e18ce6248ef1ec93a59dab5b05be468 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 Aug 2022 15:40:57 +0200 Subject: We don't need to import mocha --- server/tests/api/check-params/accounts.ts | 1 - server/tests/api/check-params/bulk.ts | 1 - server/tests/api/check-params/contact-form.ts | 1 - server/tests/api/check-params/custom-pages.ts | 3 +-- server/tests/api/check-params/debug.ts | 1 - server/tests/api/check-params/follows.ts | 1 - server/tests/api/check-params/jobs.ts | 1 - server/tests/api/check-params/my-user.ts | 1 - server/tests/api/check-params/redundancy.ts | 1 - server/tests/api/check-params/search.ts | 1 - server/tests/api/check-params/services.ts | 1 - server/tests/api/check-params/transcoding.ts | 1 - server/tests/api/check-params/upload-quota.ts | 1 - server/tests/api/check-params/user-notifications.ts | 1 - server/tests/api/check-params/user-subscriptions.ts | 1 - server/tests/api/check-params/video-captions.ts | 1 - server/tests/api/check-params/video-comments.ts | 1 - server/tests/api/check-params/video-files.ts | 1 - server/tests/api/check-params/video-playlists.ts | 1 - server/tests/api/check-params/video-studio.ts | 1 - server/tests/api/check-params/videos-common-filters.ts | 3 +-- server/tests/api/check-params/videos-history.ts | 1 - server/tests/api/check-params/videos-overviews.ts | 1 - server/tests/api/check-params/views.ts | 1 - 24 files changed, 2 insertions(+), 26 deletions(-) (limited to 'server/tests/api/check-params') diff --git a/server/tests/api/check-params/accounts.ts b/server/tests/api/check-params/accounts.ts index 07f879e0e..afc0049ff 100644 --- a/server/tests/api/check-params/accounts.ts +++ b/server/tests/api/check-params/accounts.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' import { HttpStatusCode } from '@shared/models' import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands' diff --git a/server/tests/api/check-params/bulk.ts b/server/tests/api/check-params/bulk.ts index 9bd0016cf..f03264b4f 100644 --- a/server/tests/api/check-params/bulk.ts +++ b/server/tests/api/check-params/bulk.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { cleanupTests, createSingleServer, makePostBodyRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' import { HttpStatusCode } from '@shared/models' diff --git a/server/tests/api/check-params/contact-form.ts b/server/tests/api/check-params/contact-form.ts index 9db442b0b..e82688356 100644 --- a/server/tests/api/check-params/contact-form.ts +++ b/server/tests/api/check-params/contact-form.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { MockSmtpServer } from '@server/tests/shared' import { HttpStatusCode } from '@shared/models' import { cleanupTests, ContactFormCommand, createSingleServer, killallServers, PeerTubeServer } from '@shared/server-commands' diff --git a/server/tests/api/check-params/custom-pages.ts b/server/tests/api/check-params/custom-pages.ts index a102ee437..63e3da3d5 100644 --- a/server/tests/api/check-params/custom-pages.ts +++ b/server/tests/api/check-params/custom-pages.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' +import { HttpStatusCode } from '@shared/models' import { cleanupTests, createSingleServer, @@ -9,7 +9,6 @@ import { PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' -import { HttpStatusCode } from '@shared/models' describe('Test custom pages validators', function () { const path = '/api/v1/custom-pages/homepage/instance' diff --git a/server/tests/api/check-params/debug.ts b/server/tests/api/check-params/debug.ts index cfa44deca..d7b68f163 100644 --- a/server/tests/api/check-params/debug.ts +++ b/server/tests/api/check-params/debug.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' import { HttpStatusCode } from '@shared/models' diff --git a/server/tests/api/check-params/follows.ts b/server/tests/api/check-params/follows.ts index d4dae5a75..56e9f8d96 100644 --- a/server/tests/api/check-params/follows.ts +++ b/server/tests/api/check-params/follows.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' import { HttpStatusCode } from '@shared/models' import { diff --git a/server/tests/api/check-params/jobs.ts b/server/tests/api/check-params/jobs.ts index 801b13d1e..873da3955 100644 --- a/server/tests/api/check-params/jobs.ts +++ b/server/tests/api/check-params/jobs.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' import { HttpStatusCode } from '@shared/models' import { diff --git a/server/tests/api/check-params/my-user.ts b/server/tests/api/check-params/my-user.ts index 95f2122ae..18f32d46b 100644 --- a/server/tests/api/check-params/my-user.ts +++ b/server/tests/api/check-params/my-user.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination, MockSmtpServer } from '@server/tests/shared' import { buildAbsoluteFixturePath } from '@shared/core-utils' import { HttpStatusCode, UserRole, VideoCreateResult } from '@shared/models' diff --git a/server/tests/api/check-params/redundancy.ts b/server/tests/api/check-params/redundancy.ts index 04519cf23..f45860e02 100644 --- a/server/tests/api/check-params/redundancy.ts +++ b/server/tests/api/check-params/redundancy.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' import { HttpStatusCode, VideoCreateResult } from '@shared/models' import { diff --git a/server/tests/api/check-params/search.ts b/server/tests/api/check-params/search.ts index ca0fbf31d..91e9122a7 100644 --- a/server/tests/api/check-params/search.ts +++ b/server/tests/api/check-params/search.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' import { HttpStatusCode } from '@shared/models' import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' diff --git a/server/tests/api/check-params/services.ts b/server/tests/api/check-params/services.ts index 5d1713e03..0da675902 100644 --- a/server/tests/api/check-params/services.ts +++ b/server/tests/api/check-params/services.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { HttpStatusCode, VideoCreateResult, VideoPlaylistCreateResult, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' import { cleanupTests, diff --git a/server/tests/api/check-params/transcoding.ts b/server/tests/api/check-params/transcoding.ts index 333012940..9846ac182 100644 --- a/server/tests/api/check-params/transcoding.ts +++ b/server/tests/api/check-params/transcoding.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { HttpStatusCode, UserRole } from '@shared/models' import { cleanupTests, diff --git a/server/tests/api/check-params/upload-quota.ts b/server/tests/api/check-params/upload-quota.ts index f64eafc18..70e6f4af9 100644 --- a/server/tests/api/check-params/upload-quota.ts +++ b/server/tests/api/check-params/upload-quota.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { FIXTURE_URLS } from '@server/tests/shared' import { randomInt } from '@shared/core-utils' diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts index 7fbe4271b..7de2fda79 100644 --- a/server/tests/api/check-params/user-notifications.ts +++ b/server/tests/api/check-params/user-notifications.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { io } from 'socket.io-client' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' import { wait } from '@shared/core-utils' diff --git a/server/tests/api/check-params/user-subscriptions.ts b/server/tests/api/check-params/user-subscriptions.ts index a13ed5aa3..a0e663e25 100644 --- a/server/tests/api/check-params/user-subscriptions.ts +++ b/server/tests/api/check-params/user-subscriptions.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { cleanupTests, createSingleServer, diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts index 9881df80c..bfce5ca47 100644 --- a/server/tests/api/check-params/video-captions.ts +++ b/server/tests/api/check-params/video-captions.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { buildAbsoluteFixturePath } from '@shared/core-utils' import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' import { diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts index 624d657d3..ccf36948e 100644 --- a/server/tests/api/check-params/video-comments.ts +++ b/server/tests/api/check-params/video-comments.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/check-params/video-files.ts b/server/tests/api/check-params/video-files.ts index c698bea82..aa4de2c83 100644 --- a/server/tests/api/check-params/video-files.ts +++ b/server/tests/api/check-params/video-files.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { HttpStatusCode, UserRole } from '@shared/models' import { cleanupTests, diff --git a/server/tests/api/check-params/video-playlists.ts b/server/tests/api/check-params/video-playlists.ts index 8db91a3f9..6cb34c8a1 100644 --- a/server/tests/api/check-params/video-playlists.ts +++ b/server/tests/api/check-params/video-playlists.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' import { HttpStatusCode, diff --git a/server/tests/api/check-params/video-studio.ts b/server/tests/api/check-params/video-studio.ts index 9ca55d095..dc533b242 100644 --- a/server/tests/api/check-params/video-studio.ts +++ b/server/tests/api/check-params/video-studio.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { HttpStatusCode, VideoStudioTask } from '@shared/models' import { cleanupTests, diff --git a/server/tests/api/check-params/videos-common-filters.ts b/server/tests/api/check-params/videos-common-filters.ts index 6b3ec917e..95523ce3d 100644 --- a/server/tests/api/check-params/videos-common-filters.ts +++ b/server/tests/api/check-params/videos-common-filters.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' +import { HttpStatusCode, UserRole, VideoInclude, VideoPrivacy } from '@shared/models' import { cleanupTests, createSingleServer, @@ -9,7 +9,6 @@ import { setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands' -import { HttpStatusCode, UserRole, VideoInclude, VideoPrivacy } from '@shared/models' describe('Test video filters validators', function () { let server: PeerTubeServer diff --git a/server/tests/api/check-params/videos-history.ts b/server/tests/api/check-params/videos-history.ts index c1b2d8bf3..d96fe7ca9 100644 --- a/server/tests/api/check-params/videos-history.ts +++ b/server/tests/api/check-params/videos-history.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { checkBadCountPagination, checkBadStartPagination } from '@server/tests/shared' import { HttpStatusCode } from '@shared/models' import { diff --git a/server/tests/api/check-params/videos-overviews.ts b/server/tests/api/check-params/videos-overviews.ts index 1da15dc43..f9cdb7ab3 100644 --- a/server/tests/api/check-params/videos-overviews.ts +++ b/server/tests/api/check-params/videos-overviews.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands' describe('Test videos overview', function () { diff --git a/server/tests/api/check-params/views.ts b/server/tests/api/check-params/views.ts index 9bf1ef6c3..84d31c509 100644 --- a/server/tests/api/check-params/views.ts +++ b/server/tests/api/check-params/views.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { HttpStatusCode, VideoPrivacy } from '@shared/models' import { cleanupTests, -- cgit v1.2.3