From e0faa8ad6e18ce6248ef1ec93a59dab5b05be468 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 Aug 2022 15:40:57 +0200 Subject: [PATCH] We don't need to import mocha --- server/tests/api/activitypub/client.ts | 1 - server/tests/api/activitypub/helpers.ts | 1 - server/tests/api/activitypub/security.ts | 1 - 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 - server/tests/api/live/live-constraints.ts | 1 - server/tests/api/live/live-fast-restream.ts | 1 - server/tests/api/live/live-permanent.ts | 1 - server/tests/api/live/live-rtmps.ts | 1 - server/tests/api/live/live-save-replay.ts | 1 - server/tests/api/live/live-socket-messages.ts | 1 - server/tests/api/live/live.ts | 1 - server/tests/api/moderation/abuses.ts | 1 - server/tests/api/moderation/blocklist-notification.ts | 1 - server/tests/api/moderation/blocklist.ts | 1 - server/tests/api/moderation/video-blacklist.ts | 1 - server/tests/api/notifications/admin-notifications.ts | 1 - server/tests/api/notifications/comments-notifications.ts | 1 - server/tests/api/notifications/moderation-notifications.ts | 1 - server/tests/api/notifications/notifications-api.ts | 1 - server/tests/api/notifications/user-notifications.ts | 1 - server/tests/api/object-storage/live.ts | 1 - server/tests/api/object-storage/video-imports.ts | 1 - server/tests/api/object-storage/videos.ts | 1 - server/tests/api/redundancy/manage-redundancy.ts | 1 - server/tests/api/redundancy/redundancy-constraints.ts | 1 - server/tests/api/redundancy/redundancy.ts | 1 - server/tests/api/search/search-activitypub-video-channels.ts | 1 - server/tests/api/search/search-activitypub-video-playlists.ts | 1 - server/tests/api/search/search-activitypub-videos.ts | 1 - server/tests/api/search/search-channels.ts | 1 - server/tests/api/search/search-index.ts | 3 +-- server/tests/api/search/search-playlists.ts | 1 - server/tests/api/search/search-videos.ts | 1 - server/tests/api/server/auto-follows.ts | 1 - server/tests/api/server/bulk.ts | 1 - server/tests/api/server/config-defaults.ts | 1 - server/tests/api/server/config.ts | 1 - server/tests/api/server/contact-form.ts | 1 - server/tests/api/server/email.ts | 1 - server/tests/api/server/follow-constraints.ts | 1 - server/tests/api/server/follows-moderation.ts | 1 - server/tests/api/server/follows.ts | 1 - server/tests/api/server/handle-down.ts | 1 - server/tests/api/server/homepage.ts | 1 - server/tests/api/server/jobs.ts | 1 - server/tests/api/server/logs.ts | 1 - server/tests/api/server/plugins.ts | 1 - server/tests/api/server/proxy.ts | 1 - server/tests/api/server/services.ts | 1 - server/tests/api/server/slow-follows.ts | 1 - server/tests/api/server/stats.ts | 1 - server/tests/api/server/tracker.ts | 1 - server/tests/api/transcoding/audio-only.ts | 1 - server/tests/api/transcoding/create-transcoding.ts | 1 - server/tests/api/transcoding/hls.ts | 1 - server/tests/api/users/user-subscriptions.ts | 1 - server/tests/api/users/user-videos.ts | 1 - server/tests/api/users/users-multiple-servers.ts | 1 - server/tests/api/users/users-verification.ts | 1 - server/tests/api/users/users.ts | 1 - server/tests/api/videos/multiple-servers.ts | 1 - server/tests/api/videos/resumable-upload.ts | 1 - server/tests/api/videos/single-server.ts | 1 - server/tests/api/videos/video-captions.ts | 1 - server/tests/api/videos/video-change-ownership.ts | 1 - server/tests/api/videos/video-channel-syncs.ts | 1 - server/tests/api/videos/video-channels.ts | 1 - server/tests/api/videos/video-comments.ts | 1 - server/tests/api/videos/video-description.ts | 1 - server/tests/api/videos/video-files.ts | 1 - server/tests/api/videos/video-imports.ts | 1 - server/tests/api/videos/video-nsfw.ts | 1 - server/tests/api/videos/video-playlist-thumbnails.ts | 1 - server/tests/api/videos/video-playlists.ts | 1 - server/tests/api/videos/video-privacy.ts | 1 - server/tests/api/videos/video-schedule-update.ts | 1 - server/tests/api/videos/video-source.ts | 1 - server/tests/api/videos/videos-common-filters.ts | 1 - server/tests/api/videos/videos-history.ts | 1 - server/tests/api/videos/videos-overview.ts | 1 - server/tests/api/views/video-views-counter.ts | 1 - server/tests/api/views/video-views-overall-stats.ts | 1 - server/tests/api/views/video-views-retention-stats.ts | 1 - server/tests/api/views/video-views-timeserie-stats.ts | 1 - server/tests/api/views/videos-views-cleaner.ts | 1 - server/tests/cli/create-import-video-file-job.ts | 1 - server/tests/cli/create-move-video-storage-job.ts | 1 - server/tests/cli/create-transcoding-job.ts | 1 - server/tests/cli/peertube.ts | 1 - server/tests/cli/plugins.ts | 1 - server/tests/cli/print-transcode-command.ts | 1 - server/tests/cli/prune-storage.ts | 1 - server/tests/cli/regenerate-thumbnails.ts | 1 - server/tests/cli/reset-password.ts | 1 - server/tests/cli/update-host.ts | 1 - server/tests/client.ts | 1 - server/tests/external-plugins/auth-ldap.ts | 1 - server/tests/external-plugins/auto-block-videos.ts | 1 - server/tests/external-plugins/auto-mute.ts | 1 - server/tests/feeds/feeds.ts | 1 - server/tests/helpers/comment-model.ts | 1 - server/tests/helpers/core-utils.ts | 1 - server/tests/helpers/dns.ts | 1 - server/tests/helpers/image.ts | 1 - server/tests/helpers/markdown.ts | 1 - server/tests/helpers/request.ts | 1 - server/tests/lib/video-constant-registry-factory.ts | 1 - server/tests/misc-endpoints.ts | 1 - server/tests/plugins/action-hooks.ts | 1 - server/tests/plugins/external-auth.ts | 1 - server/tests/plugins/filter-hooks.ts | 1 - server/tests/plugins/html-injection.ts | 1 - server/tests/plugins/id-and-pass-auth.ts | 1 - server/tests/plugins/plugin-helpers.ts | 1 - server/tests/plugins/plugin-router.ts | 1 - server/tests/plugins/plugin-storage.ts | 1 - server/tests/plugins/plugin-transcoding.ts | 1 - server/tests/plugins/plugin-unloading.ts | 1 - server/tests/plugins/translations.ts | 1 - server/tests/plugins/video-constants.ts | 1 - 143 files changed, 3 insertions(+), 146 deletions(-) diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts index 655fa30d0..b12ffe341 100644 --- a/server/tests/api/activitypub/client.ts +++ b/server/tests/api/activitypub/client.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { processViewersStats } from '@server/tests/shared' import { HttpStatusCode, VideoPlaylistPrivacy, WatchActionObject } from '@shared/models' diff --git a/server/tests/api/activitypub/helpers.ts b/server/tests/api/activitypub/helpers.ts index 56de7a879..bad86ef47 100644 --- a/server/tests/api/activitypub/helpers.ts +++ b/server/tests/api/activitypub/helpers.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { cloneDeep } from 'lodash' import { signAndContextify } from '@server/lib/activitypub/send' diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts index 95e2aebb4..5e29b744f 100644 --- a/server/tests/api/activitypub/security.ts +++ b/server/tests/api/activitypub/security.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { buildDigest } from '@server/helpers/peertube-crypto' import { HTTP_SIGNATURE } from '@server/initializers/constants' 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, diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.ts index cf43c262a..876538302 100644 --- a/server/tests/api/live/live-constraints.ts +++ b/server/tests/api/live/live-constraints.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { LiveVideoError, VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/live/live-fast-restream.ts b/server/tests/api/live/live-fast-restream.ts index fb4ae147c..d3dae9e98 100644 --- a/server/tests/api/live/live-fast-restream.ts +++ b/server/tests/api/live/live-fast-restream.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { HttpStatusCode, LiveVideoCreate, VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.ts index f5c67c579..da392ba84 100644 --- a/server/tests/api/live/live-permanent.ts +++ b/server/tests/api/live/live-permanent.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models' diff --git a/server/tests/api/live/live-rtmps.ts b/server/tests/api/live/live-rtmps.ts index 935061971..46cfef989 100644 --- a/server/tests/api/live/live-rtmps.ts +++ b/server/tests/api/live/live-rtmps.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { buildAbsoluteFixturePath } from '@shared/core-utils' import { VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/live/live-save-replay.ts b/server/tests/api/live/live-save-replay.ts index b89aed85a..80df93924 100644 --- a/server/tests/api/live/live-save-replay.ts +++ b/server/tests/api/live/live-save-replay.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { FfmpegCommand } from 'fluent-ffmpeg' import { checkLiveCleanup } from '@server/tests/shared' diff --git a/server/tests/api/live/live-socket-messages.ts b/server/tests/api/live/live-socket-messages.ts index 1669369c0..7c2b449ac 100644 --- a/server/tests/api/live/live-socket-messages.ts +++ b/server/tests/api/live/live-socket-messages.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { VideoPrivacy, VideoState } from '@shared/models' diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts index d32036263..8d3bf61a1 100644 --- a/server/tests/api/live/live.ts +++ b/server/tests/api/live/live.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { basename, join } from 'path' import { ffprobePromise, getVideoStream } from '@server/helpers/ffmpeg' diff --git a/server/tests/api/moderation/abuses.ts b/server/tests/api/moderation/abuses.ts index 0a656b41f..1c083a3d1 100644 --- a/server/tests/api/moderation/abuses.ts +++ b/server/tests/api/moderation/abuses.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models' import { diff --git a/server/tests/api/moderation/blocklist-notification.ts b/server/tests/api/moderation/blocklist-notification.ts index 265477f57..d5d0e5178 100644 --- a/server/tests/api/moderation/blocklist-notification.ts +++ b/server/tests/api/moderation/blocklist-notification.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { UserNotificationType } from '@shared/models' import { diff --git a/server/tests/api/moderation/blocklist.ts b/server/tests/api/moderation/blocklist.ts index a5a92317d..ef2c5d7f3 100644 --- a/server/tests/api/moderation/blocklist.ts +++ b/server/tests/api/moderation/blocklist.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { UserNotificationType } from '@shared/models' import { diff --git a/server/tests/api/moderation/video-blacklist.ts b/server/tests/api/moderation/video-blacklist.ts index a7620b071..68823f97a 100644 --- a/server/tests/api/moderation/video-blacklist.ts +++ b/server/tests/api/moderation/video-blacklist.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { FIXTURE_URLS } from '@server/tests/shared' import { sortObjectComparator } from '@shared/core-utils' diff --git a/server/tests/api/notifications/admin-notifications.ts b/server/tests/api/notifications/admin-notifications.ts index 1501f9227..b3bb4888e 100644 --- a/server/tests/api/notifications/admin-notifications.ts +++ b/server/tests/api/notifications/admin-notifications.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { CheckerBaseParams, diff --git a/server/tests/api/notifications/comments-notifications.ts b/server/tests/api/notifications/comments-notifications.ts index b82f1712a..7bbec736b 100644 --- a/server/tests/api/notifications/comments-notifications.ts +++ b/server/tests/api/notifications/comments-notifications.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { checkCommentMention, diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts index 9e330bd61..ad991210e 100644 --- a/server/tests/api/notifications/moderation-notifications.ts +++ b/server/tests/api/notifications/moderation-notifications.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { checkAbuseStateChange, checkAutoInstanceFollowing, diff --git a/server/tests/api/notifications/notifications-api.ts b/server/tests/api/notifications/notifications-api.ts index e2b4777c0..e5d883538 100644 --- a/server/tests/api/notifications/notifications-api.ts +++ b/server/tests/api/notifications/notifications-api.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { CheckerBaseParams, diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts index a11289236..ca5e15738 100644 --- a/server/tests/api/notifications/user-notifications.ts +++ b/server/tests/api/notifications/user-notifications.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { CheckerBaseParams, diff --git a/server/tests/api/object-storage/live.ts b/server/tests/api/object-storage/live.ts index 5d6281dec..94fff8f6b 100644 --- a/server/tests/api/object-storage/live.ts +++ b/server/tests/api/object-storage/live.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { expectStartWith } from '@server/tests/shared' import { areObjectStorageTestsDisabled } from '@shared/core-utils' diff --git a/server/tests/api/object-storage/video-imports.ts b/server/tests/api/object-storage/video-imports.ts index fb81832af..141ead2f7 100644 --- a/server/tests/api/object-storage/video-imports.ts +++ b/server/tests/api/object-storage/video-imports.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { expectStartWith, FIXTURE_URLS } from '@server/tests/shared' import { areObjectStorageTestsDisabled } from '@shared/core-utils' diff --git a/server/tests/api/object-storage/videos.ts b/server/tests/api/object-storage/videos.ts index e288e542e..cdb68b962 100644 --- a/server/tests/api/object-storage/videos.ts +++ b/server/tests/api/object-storage/videos.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import bytes from 'bytes' import * as chai from 'chai' import { stat } from 'fs-extra' diff --git a/server/tests/api/redundancy/manage-redundancy.ts b/server/tests/api/redundancy/manage-redundancy.ts index d415ac3bf..b607900f8 100644 --- a/server/tests/api/redundancy/manage-redundancy.ts +++ b/server/tests/api/redundancy/manage-redundancy.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { cleanupTests, diff --git a/server/tests/api/redundancy/redundancy-constraints.ts b/server/tests/api/redundancy/redundancy-constraints.ts index 17c6b25a5..c86573168 100644 --- a/server/tests/api/redundancy/redundancy-constraints.ts +++ b/server/tests/api/redundancy/redundancy-constraints.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { VideoPrivacy } from '@shared/models' import { diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts index 9887d2535..cc150e02e 100644 --- a/server/tests/api/redundancy/redundancy.ts +++ b/server/tests/api/redundancy/redundancy.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { readdir } from 'fs-extra' import magnetUtil from 'magnet-uri' diff --git a/server/tests/api/search/search-activitypub-video-channels.ts b/server/tests/api/search/search-activitypub-video-channels.ts index 5f5322d03..118be11af 100644 --- a/server/tests/api/search/search-activitypub-video-channels.ts +++ b/server/tests/api/search/search-activitypub-video-channels.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { VideoChannel } from '@shared/models' diff --git a/server/tests/api/search/search-activitypub-video-playlists.ts b/server/tests/api/search/search-activitypub-video-playlists.ts index b9a424292..1ba9ce2c4 100644 --- a/server/tests/api/search/search-activitypub-video-playlists.ts +++ b/server/tests/api/search/search-activitypub-video-playlists.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { VideoPlaylistPrivacy } from '@shared/models' diff --git a/server/tests/api/search/search-activitypub-videos.ts b/server/tests/api/search/search-activitypub-videos.ts index 20249b1f1..b17b92dca 100644 --- a/server/tests/api/search/search-activitypub-videos.ts +++ b/server/tests/api/search/search-activitypub-videos.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/search/search-channels.ts b/server/tests/api/search/search-channels.ts index cd4c053d2..cab8e6292 100644 --- a/server/tests/api/search/search-channels.ts +++ b/server/tests/api/search/search-channels.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { VideoChannel } from '@shared/models' import { diff --git a/server/tests/api/search/search-index.ts b/server/tests/api/search/search-index.ts index 53b91e1cb..ece6c0475 100644 --- a/server/tests/api/search/search-index.ts +++ b/server/tests/api/search/search-index.ts @@ -1,8 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' -import { cleanupTests, createSingleServer, PeerTubeServer, SearchCommand, setAccessTokensToServers } from '@shared/server-commands' import { BooleanBothQuery, VideoChannelsSearchQuery, @@ -11,6 +9,7 @@ import { VideoPlaylistType, VideosSearchQuery } from '@shared/models' +import { cleanupTests, createSingleServer, PeerTubeServer, SearchCommand, setAccessTokensToServers } from '@shared/server-commands' const expect = chai.expect diff --git a/server/tests/api/search/search-playlists.ts b/server/tests/api/search/search-playlists.ts index d9f12d316..8d48de641 100644 --- a/server/tests/api/search/search-playlists.ts +++ b/server/tests/api/search/search-playlists.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { VideoPlaylistPrivacy } from '@shared/models' import { diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts index b1ebc855c..5f2da55e2 100644 --- a/server/tests/api/search/search-videos.ts +++ b/server/tests/api/search/search-videos.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/server/auto-follows.ts b/server/tests/api/server/auto-follows.ts index bfec95c65..9666e61dd 100644 --- a/server/tests/api/server/auto-follows.ts +++ b/server/tests/api/server/auto-follows.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { MockInstancesIndex } from '@server/tests/shared' import { wait } from '@shared/core-utils' diff --git a/server/tests/api/server/bulk.ts b/server/tests/api/server/bulk.ts index 1b81a6954..560dcc76e 100644 --- a/server/tests/api/server/bulk.ts +++ b/server/tests/api/server/bulk.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { BulkCommand, diff --git a/server/tests/api/server/config-defaults.ts b/server/tests/api/server/config-defaults.ts index 3ff09bf7e..47ee4746d 100644 --- a/server/tests/api/server/config-defaults.ts +++ b/server/tests/api/server/config-defaults.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { FIXTURE_URLS } from '@server/tests/shared' import { VideoDetails, VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index fc8711161..2b2b093a7 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { parallelTests } from '@shared/core-utils' import { CustomConfig, HttpStatusCode } from '@shared/models' diff --git a/server/tests/api/server/contact-form.ts b/server/tests/api/server/contact-form.ts index d6165b293..3eb6c8548 100644 --- a/server/tests/api/server/contact-form.ts +++ b/server/tests/api/server/contact-form.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { MockSmtpServer } from '@server/tests/shared' import { wait } from '@shared/core-utils' diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts index 20b5e378c..5ac66225f 100644 --- a/server/tests/api/server/email.ts +++ b/server/tests/api/server/email.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { MockSmtpServer } from '@server/tests/shared' import { HttpStatusCode } from '@shared/models' diff --git a/server/tests/api/server/follow-constraints.ts b/server/tests/api/server/follow-constraints.ts index 455fbc762..c5c8c8595 100644 --- a/server/tests/api/server/follow-constraints.ts +++ b/server/tests/api/server/follow-constraints.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' import { HttpStatusCode, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' diff --git a/server/tests/api/server/follows-moderation.ts b/server/tests/api/server/follows-moderation.ts index 653dfbde0..dc189fec5 100644 --- a/server/tests/api/server/follows-moderation.ts +++ b/server/tests/api/server/follows-moderation.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { expectStartWith } from '@server/tests/shared' import { ActorFollow, FollowState } from '@shared/models' diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts index c588cf664..3ff8c3583 100644 --- a/server/tests/api/server/follows.ts +++ b/server/tests/api/server/follows.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { completeVideoCheck, dateIsValid, expectAccountFollows, expectChannelsFollows, testCaptionFile } from '@server/tests/shared' import { VideoCreateResult, VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts index c45d3ea60..78b3f8560 100644 --- a/server/tests/api/server/handle-down.ts +++ b/server/tests/api/server/handle-down.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { completeVideoCheck } from '@server/tests/shared' import { wait } from '@shared/core-utils' diff --git a/server/tests/api/server/homepage.ts b/server/tests/api/server/homepage.ts index e7de6bfee..1867826d6 100644 --- a/server/tests/api/server/homepage.ts +++ b/server/tests/api/server/homepage.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { HttpStatusCode } from '@shared/models' import { diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts index d9dee1776..8217da19b 100644 --- a/server/tests/api/server/jobs.ts +++ b/server/tests/api/server/jobs.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { dateIsValid } from '@server/tests/shared' import { wait } from '@shared/core-utils' diff --git a/server/tests/api/server/logs.ts b/server/tests/api/server/logs.ts index ed7555fd7..8e626c9df 100644 --- a/server/tests/api/server/logs.ts +++ b/server/tests/api/server/logs.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { HttpStatusCode } from '@shared/models' import { diff --git a/server/tests/api/server/plugins.ts b/server/tests/api/server/plugins.ts index bb925a624..fbcf4651e 100644 --- a/server/tests/api/server/plugins.ts +++ b/server/tests/api/server/plugins.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { pathExists, remove } from 'fs-extra' import { join } from 'path' diff --git a/server/tests/api/server/proxy.ts b/server/tests/api/server/proxy.ts index e238edaf4..851bed058 100644 --- a/server/tests/api/server/proxy.ts +++ b/server/tests/api/server/proxy.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { expectNotStartWith, expectStartWith, FIXTURE_URLS, MockProxy } from '@server/tests/shared' import { areObjectStorageTestsDisabled } from '@shared/core-utils' diff --git a/server/tests/api/server/services.ts b/server/tests/api/server/services.ts index 2f95f953b..ed7aca6b6 100644 --- a/server/tests/api/server/services.ts +++ b/server/tests/api/server/services.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands' import { Video, VideoPlaylistPrivacy } from '@shared/models' diff --git a/server/tests/api/server/slow-follows.ts b/server/tests/api/server/slow-follows.ts index de24e734c..73ac26bf8 100644 --- a/server/tests/api/server/slow-follows.ts +++ b/server/tests/api/server/slow-follows.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { Job } from '@shared/models' import { diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.ts index bc35cbe4e..6dad22aa1 100644 --- a/server/tests/api/server/stats.ts +++ b/server/tests/api/server/stats.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { ActivityType, VideoPlaylistPrivacy } from '@shared/models' diff --git a/server/tests/api/server/tracker.ts b/server/tests/api/server/tracker.ts index 712bb485f..edc1b3123 100644 --- a/server/tests/api/server/tracker.ts +++ b/server/tests/api/server/tracker.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await,@typescript-eslint/no-floating-promises */ -import 'mocha' import magnetUtil from 'magnet-uri' import WebTorrent from 'webtorrent' import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' diff --git a/server/tests/api/transcoding/audio-only.ts b/server/tests/api/transcoding/audio-only.ts index e7e73d382..da1d50eb2 100644 --- a/server/tests/api/transcoding/audio-only.ts +++ b/server/tests/api/transcoding/audio-only.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { getAudioStream, getVideoStreamDimensionsInfo } from '@server/helpers/ffmpeg' import { diff --git a/server/tests/api/transcoding/create-transcoding.ts b/server/tests/api/transcoding/create-transcoding.ts index b59bef772..e1972f275 100644 --- a/server/tests/api/transcoding/create-transcoding.ts +++ b/server/tests/api/transcoding/create-transcoding.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { checkResolutionsInMasterPlaylist, expectStartWith } from '@server/tests/shared' import { areObjectStorageTestsDisabled } from '@shared/core-utils' diff --git a/server/tests/api/transcoding/hls.ts b/server/tests/api/transcoding/hls.ts index 218ec08ae..a7ac97e0a 100644 --- a/server/tests/api/transcoding/hls.ts +++ b/server/tests/api/transcoding/hls.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { basename, join } from 'path' import { diff --git a/server/tests/api/users/user-subscriptions.ts b/server/tests/api/users/user-subscriptions.ts index 9553a69bb..c024fa75c 100644 --- a/server/tests/api/users/user-subscriptions.ts +++ b/server/tests/api/users/user-subscriptions.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { VideoPrivacy } from '@shared/models' import { diff --git a/server/tests/api/users/user-videos.ts b/server/tests/api/users/user-videos.ts index 2f5dd1c3e..87040d2e4 100644 --- a/server/tests/api/users/user-videos.ts +++ b/server/tests/api/users/user-videos.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { HttpStatusCode } from '@shared/models' import { diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts index 3e8b932c0..d1b9f76f9 100644 --- a/server/tests/api/users/users-multiple-servers.ts +++ b/server/tests/api/users/users-multiple-servers.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { checkActorFilesWereRemoved, diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts index 0f3cc401a..3d657f73e 100644 --- a/server/tests/api/users/users-verification.ts +++ b/server/tests/api/users/users-verification.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { MockSmtpServer } from '@server/tests/shared' import { HttpStatusCode } from '@shared/models' diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 1edbb371a..3fd68cfe6 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { testImage } from '@server/tests/shared' import { AbuseState, HttpStatusCode, OAuth2ErrorCode, UserAdminFlag, UserRole, VideoPlaylistType } from '@shared/models' diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index 84c1515a3..766cc8236 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import request from 'supertest' import { diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts index b6d70ed44..9936d5467 100644 --- a/server/tests/api/videos/resumable-upload.ts +++ b/server/tests/api/videos/resumable-upload.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { pathExists, readdir, stat } from 'fs-extra' import { join } from 'path' diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index c1d86776a..574fb523e 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { checkVideoFilesWereRemoved, completeVideoCheck, testImage } from '@server/tests/shared' import { wait } from '@shared/core-utils' diff --git a/server/tests/api/videos/video-captions.ts b/server/tests/api/videos/video-captions.ts index b7f26c35f..b68e5e6e8 100644 --- a/server/tests/api/videos/video-captions.ts +++ b/server/tests/api/videos/video-captions.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { checkVideoFilesWereRemoved, testCaptionFile } from '@server/tests/shared' import { wait } from '@shared/core-utils' diff --git a/server/tests/api/videos/video-change-ownership.ts b/server/tests/api/videos/video-change-ownership.ts index 6c229c6cf..85bc191b6 100644 --- a/server/tests/api/videos/video-change-ownership.ts +++ b/server/tests/api/videos/video-change-ownership.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { ChangeOwnershipCommand, diff --git a/server/tests/api/videos/video-channel-syncs.ts b/server/tests/api/videos/video-channel-syncs.ts index 835d3cb09..4e18ddfc7 100644 --- a/server/tests/api/videos/video-channel-syncs.ts +++ b/server/tests/api/videos/video-channel-syncs.ts @@ -1,4 +1,3 @@ -import 'mocha' import { expect } from 'chai' import { FIXTURE_URLS } from '@server/tests/shared' import { areHttpImportTestsDisabled } from '@shared/core-utils' diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts index ffe6eef73..b7645ea59 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { basename } from 'path' import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants' diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts index 5ab401aa4..6d74a865f 100644 --- a/server/tests/api/videos/video-comments.ts +++ b/server/tests/api/videos/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 { dateIsValid, testImage } from '@server/tests/shared' import { diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts index 20b20488f..347325741 100644 --- a/server/tests/api/videos/video-description.ts +++ b/server/tests/api/videos/video-description.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { cleanupTests, diff --git a/server/tests/api/videos/video-files.ts b/server/tests/api/videos/video-files.ts index d204a54de..10277b9cf 100644 --- a/server/tests/api/videos/video-files.ts +++ b/server/tests/api/videos/video-files.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { HttpStatusCode } from '@shared/models' import { diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts index f082d4bd7..0583134b2 100644 --- a/server/tests/api/videos/video-imports.ts +++ b/server/tests/api/videos/video-imports.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { pathExists, readdir, remove } from 'fs-extra' import { join } from 'path' diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts index 34713025d..cfa130043 100644 --- a/server/tests/api/videos/video-nsfw.ts +++ b/server/tests/api/videos/video-nsfw.ts @@ -1,6 +1,5 @@ /* 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/server-commands' import { BooleanBothQuery, CustomConfig, ResultList, Video, VideosOverview } from '@shared/models' diff --git a/server/tests/api/videos/video-playlist-thumbnails.ts b/server/tests/api/videos/video-playlist-thumbnails.ts index 3944dc344..019f34b6b 100644 --- a/server/tests/api/videos/video-playlist-thumbnails.ts +++ b/server/tests/api/videos/video-playlist-thumbnails.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { testImage } from '@server/tests/shared' import { VideoPlaylistPrivacy } from '@shared/models' diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts index c33a63df0..dd5f6a3ca 100644 --- a/server/tests/api/videos/video-playlists.ts +++ b/server/tests/api/videos/video-playlists.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared' import { wait } from '@shared/core-utils' diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts index 1073aee8c..711622df9 100644 --- a/server/tests/api/videos/video-privacy.ts +++ b/server/tests/api/videos/video-privacy.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts index 00b4f6cbc..7865b3439 100644 --- a/server/tests/api/videos/video-schedule-update.ts +++ b/server/tests/api/videos/video-schedule-update.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/videos/video-source.ts b/server/tests/api/videos/video-source.ts index e34642300..4c1641ed0 100644 --- a/server/tests/api/videos/video-source.ts +++ b/server/tests/api/videos/video-source.ts @@ -1,4 +1,3 @@ -import 'mocha' import * as chai from 'chai' import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' diff --git a/server/tests/api/videos/videos-common-filters.ts b/server/tests/api/videos/videos-common-filters.ts index 317de90a9..7151e1bda 100644 --- a/server/tests/api/videos/videos-common-filters.ts +++ b/server/tests/api/videos/videos-common-filters.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { pick } from '@shared/core-utils' import { HttpStatusCode, UserRole, Video, VideoDetails, VideoInclude, VideoPrivacy } from '@shared/models' diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts index e102fd7c0..500744e40 100644 --- a/server/tests/api/videos/videos-history.ts +++ b/server/tests/api/videos/videos-history.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { Video } from '@shared/models' diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts index 61fc0cb20..5159e8248 100644 --- a/server/tests/api/videos/videos-overview.ts +++ b/server/tests/api/videos/videos-overview.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { VideosOverview } from '@shared/models' diff --git a/server/tests/api/views/video-views-counter.ts b/server/tests/api/views/video-views-counter.ts index 42ef41fb3..9ade1dc0c 100644 --- a/server/tests/api/views/video-views-counter.ts +++ b/server/tests/api/views/video-views-counter.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { FfmpegCommand } from 'fluent-ffmpeg' import { prepareViewsServers, prepareViewsVideos, processViewsBuffer } from '@server/tests/shared' diff --git a/server/tests/api/views/video-views-overall-stats.ts b/server/tests/api/views/video-views-overall-stats.ts index 25e488b91..b21d70c0b 100644 --- a/server/tests/api/views/video-views-overall-stats.ts +++ b/server/tests/api/views/video-views-overall-stats.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { FfmpegCommand } from 'fluent-ffmpeg' import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' diff --git a/server/tests/api/views/video-views-retention-stats.ts b/server/tests/api/views/video-views-retention-stats.ts index a27141d68..307d6de07 100644 --- a/server/tests/api/views/video-views-retention-stats.ts +++ b/server/tests/api/views/video-views-retention-stats.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' import { cleanupTests, PeerTubeServer } from '@shared/server-commands' diff --git a/server/tests/api/views/video-views-timeserie-stats.ts b/server/tests/api/views/video-views-timeserie-stats.ts index 6f03b0e82..d6c89a63e 100644 --- a/server/tests/api/views/video-views-timeserie-stats.ts +++ b/server/tests/api/views/video-views-timeserie-stats.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { FfmpegCommand } from 'fluent-ffmpeg' import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' diff --git a/server/tests/api/views/videos-views-cleaner.ts b/server/tests/api/views/videos-views-cleaner.ts index ef988837f..e28f82668 100644 --- a/server/tests/api/views/videos-views-cleaner.ts +++ b/server/tests/api/views/videos-views-cleaner.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { wait } from '@shared/core-utils' import { diff --git a/server/tests/cli/create-import-video-file-job.ts b/server/tests/cli/create-import-video-file-job.ts index 8ef0545d0..aa24e6996 100644 --- a/server/tests/cli/create-import-video-file-job.ts +++ b/server/tests/cli/create-import-video-file-job.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { areObjectStorageTestsDisabled } from '@shared/core-utils' import { HttpStatusCode, VideoDetails, VideoFile, VideoInclude } from '@shared/models' diff --git a/server/tests/cli/create-move-video-storage-job.ts b/server/tests/cli/create-move-video-storage-job.ts index c674d28d2..6a12a2c6c 100644 --- a/server/tests/cli/create-move-video-storage-job.ts +++ b/server/tests/cli/create-move-video-storage-job.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { areObjectStorageTestsDisabled } from '@shared/core-utils' import { HttpStatusCode, VideoDetails } from '@shared/models' import { diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts index b90e9bde9..48302c9e4 100644 --- a/server/tests/cli/create-transcoding-job.ts +++ b/server/tests/cli/create-transcoding-job.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { areObjectStorageTestsDisabled } from '@shared/core-utils' import { HttpStatusCode, VideoFile } from '@shared/models' diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts index 3aa24a0f8..9b17cdd1b 100644 --- a/server/tests/cli/peertube.ts +++ b/server/tests/cli/peertube.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { areHttpImportTestsDisabled, buildAbsoluteFixturePath } from '@shared/core-utils' import { diff --git a/server/tests/cli/plugins.ts b/server/tests/cli/plugins.ts index cd9f4e1c3..c646e20d9 100644 --- a/server/tests/cli/plugins.ts +++ b/server/tests/cli/plugins.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { cleanupTests, diff --git a/server/tests/cli/print-transcode-command.ts b/server/tests/cli/print-transcode-command.ts index d5b584577..ab4df46fc 100644 --- a/server/tests/cli/print-transcode-command.ts +++ b/server/tests/cli/print-transcode-command.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { buildAbsoluteFixturePath } from '@shared/core-utils' import { CLICommand } from '@shared/server-commands' diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts index 3ca7c19ea..15bfb30f0 100644 --- a/server/tests/cli/prune-storage.ts +++ b/server/tests/cli/prune-storage.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { createFile, readdir } from 'fs-extra' import { join } from 'path' diff --git a/server/tests/cli/regenerate-thumbnails.ts b/server/tests/cli/regenerate-thumbnails.ts index 98d15272a..f459b11b8 100644 --- a/server/tests/cli/regenerate-thumbnails.ts +++ b/server/tests/cli/regenerate-thumbnails.ts @@ -1,4 +1,3 @@ -import 'mocha' import { expect } from 'chai' import { writeFile } from 'fs-extra' import { basename, join } from 'path' diff --git a/server/tests/cli/reset-password.ts b/server/tests/cli/reset-password.ts index 018e9d788..79892173b 100644 --- a/server/tests/cli/reset-password.ts +++ b/server/tests/cli/reset-password.ts @@ -1,4 +1,3 @@ -import 'mocha' import { cleanupTests, CLICommand, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' describe('Test reset password scripts', function () { diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts index 7c49efd20..53c4e7824 100644 --- a/server/tests/cli/update-host.ts +++ b/server/tests/cli/update-host.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { cleanupTests, diff --git a/server/tests/client.ts b/server/tests/client.ts index 35b472d76..0cb460327 100644 --- a/server/tests/client.ts +++ b/server/tests/client.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { omit } from '@shared/core-utils' import { diff --git a/server/tests/external-plugins/auth-ldap.ts b/server/tests/external-plugins/auth-ldap.ts index 326453a5f..d7f155d2a 100644 --- a/server/tests/external-plugins/auth-ldap.ts +++ b/server/tests/external-plugins/auth-ldap.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' import { HttpStatusCode } from '@shared/models' diff --git a/server/tests/external-plugins/auto-block-videos.ts b/server/tests/external-plugins/auto-block-videos.ts index bc5c93621..7df0b3390 100644 --- a/server/tests/external-plugins/auto-block-videos.ts +++ b/server/tests/external-plugins/auto-block-videos.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { wait } from '@shared/core-utils' import { Video } from '@shared/models' diff --git a/server/tests/external-plugins/auto-mute.ts b/server/tests/external-plugins/auto-mute.ts index 375ccf91a..b4578cd90 100644 --- a/server/tests/external-plugins/auto-mute.ts +++ b/server/tests/external-plugins/auto-mute.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { wait } from '@shared/core-utils' import { HttpStatusCode } from '@shared/models' diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts index 67a9ed8e0..3a4b063bc 100644 --- a/server/tests/feeds/feeds.ts +++ b/server/tests/feeds/feeds.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { XMLParser, XMLValidator } from 'fast-xml-parser' import { HttpStatusCode, VideoPrivacy } from '@shared/models' diff --git a/server/tests/helpers/comment-model.ts b/server/tests/helpers/comment-model.ts index 31dc6ec72..e1c563dee 100644 --- a/server/tests/helpers/comment-model.ts +++ b/server/tests/helpers/comment-model.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { VideoCommentModel } from '../../models/video/video-comment' diff --git a/server/tests/helpers/core-utils.ts b/server/tests/helpers/core-utils.ts index e3e5eb45c..4f059d982 100644 --- a/server/tests/helpers/core-utils.ts +++ b/server/tests/helpers/core-utils.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { snakeCase } from 'lodash' import validator from 'validator' diff --git a/server/tests/helpers/dns.ts b/server/tests/helpers/dns.ts index 309de5426..49b506e7b 100644 --- a/server/tests/helpers/dns.ts +++ b/server/tests/helpers/dns.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { isResolvingToUnicastOnly } from '@server/helpers/dns' diff --git a/server/tests/helpers/image.ts b/server/tests/helpers/image.ts index 7c5da69b5..19a99cba9 100644 --- a/server/tests/helpers/image.ts +++ b/server/tests/helpers/image.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { readFile, remove } from 'fs-extra' import { join } from 'path' diff --git a/server/tests/helpers/markdown.ts b/server/tests/helpers/markdown.ts index 8177477f6..6fab31d6f 100644 --- a/server/tests/helpers/markdown.ts +++ b/server/tests/helpers/markdown.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { mdToOneLinePlainText } from '@server/helpers/markdown' import { expect } from 'chai' diff --git a/server/tests/helpers/request.ts b/server/tests/helpers/request.ts index de507ba35..a85d80b88 100644 --- a/server/tests/helpers/request.ts +++ b/server/tests/helpers/request.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { pathExists, remove } from 'fs-extra' import { join } from 'path' diff --git a/server/tests/lib/video-constant-registry-factory.ts b/server/tests/lib/video-constant-registry-factory.ts index e26b286e1..e399ac5a5 100644 --- a/server/tests/lib/video-constant-registry-factory.ts +++ b/server/tests/lib/video-constant-registry-factory.ts @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-unused-expressions */ -import 'mocha' import { expect } from 'chai' import { VideoConstantManagerFactory } from '@server/lib/plugins/video-constant-manager-factory' import { diff --git a/server/tests/misc-endpoints.ts b/server/tests/misc-endpoints.ts index 876546d89..3f6a26cf9 100644 --- a/server/tests/misc-endpoints.ts +++ b/server/tests/misc-endpoints.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' import { HttpStatusCode, VideoPrivacy } from '@shared/models' diff --git a/server/tests/plugins/action-hooks.ts b/server/tests/plugins/action-hooks.ts index 405f81d7c..af65166d9 100644 --- a/server/tests/plugins/action-hooks.ts +++ b/server/tests/plugins/action-hooks.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { ServerHookName, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' import { cleanupTests, diff --git a/server/tests/plugins/external-auth.ts b/server/tests/plugins/external-auth.ts index 042681dbe..e08b83791 100644 --- a/server/tests/plugins/external-auth.ts +++ b/server/tests/plugins/external-auth.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { wait } from '@shared/core-utils' import { HttpStatusCode, UserRole } from '@shared/models' diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index 7e98d9be6..e05de587d 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { HttpStatusCode, VideoDetails, VideoImportState, VideoPlaylist, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' import { diff --git a/server/tests/plugins/html-injection.ts b/server/tests/plugins/html-injection.ts index 0a3a9c25f..35d710b30 100644 --- a/server/tests/plugins/html-injection.ts +++ b/server/tests/plugins/html-injection.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { cleanupTests, diff --git a/server/tests/plugins/id-and-pass-auth.ts b/server/tests/plugins/id-and-pass-auth.ts index e72046ce2..85faac5a8 100644 --- a/server/tests/plugins/id-and-pass-auth.ts +++ b/server/tests/plugins/id-and-pass-auth.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { wait } from '@shared/core-utils' import { HttpStatusCode, UserRole } from '@shared/models' diff --git a/server/tests/plugins/plugin-helpers.ts b/server/tests/plugins/plugin-helpers.ts index 49807f8f5..955d7ddfd 100644 --- a/server/tests/plugins/plugin-helpers.ts +++ b/server/tests/plugins/plugin-helpers.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { pathExists } from 'fs-extra' import { HttpStatusCode, ThumbnailType } from '@shared/models' diff --git a/server/tests/plugins/plugin-router.ts b/server/tests/plugins/plugin-router.ts index 58629adc7..40b15eb79 100644 --- a/server/tests/plugins/plugin-router.ts +++ b/server/tests/plugins/plugin-router.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { cleanupTests, diff --git a/server/tests/plugins/plugin-storage.ts b/server/tests/plugins/plugin-storage.ts index 0bfc4fe28..112652a1f 100644 --- a/server/tests/plugins/plugin-storage.ts +++ b/server/tests/plugins/plugin-storage.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { pathExists, readdir, readFile } from 'fs-extra' import { join } from 'path' diff --git a/server/tests/plugins/plugin-transcoding.ts b/server/tests/plugins/plugin-transcoding.ts index 49569f1fa..ce1047388 100644 --- a/server/tests/plugins/plugin-transcoding.ts +++ b/server/tests/plugins/plugin-transcoding.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { getAudioStream, getVideoStreamFPS, getVideoStream } from '@server/helpers/ffmpeg' import { VideoPrivacy } from '@shared/models' diff --git a/server/tests/plugins/plugin-unloading.ts b/server/tests/plugins/plugin-unloading.ts index a94b83695..5aca1a0c0 100644 --- a/server/tests/plugins/plugin-unloading.ts +++ b/server/tests/plugins/plugin-unloading.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { cleanupTests, diff --git a/server/tests/plugins/translations.ts b/server/tests/plugins/translations.ts index 0b6e5793d..a76edaf44 100644 --- a/server/tests/plugins/translations.ts +++ b/server/tests/plugins/translations.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { cleanupTests, createSingleServer, PeerTubeServer, PluginsCommand, setAccessTokensToServers } from '@shared/server-commands' diff --git a/server/tests/plugins/video-constants.ts b/server/tests/plugins/video-constants.ts index 6dce6922f..27e97d9c0 100644 --- a/server/tests/plugins/video-constants.ts +++ b/server/tests/plugins/video-constants.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import * as chai from 'chai' import { cleanupTests,