From 863477173efa82a4412d2e522aa46462249f9199 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 Aug 2022 15:44:32 +0200 Subject: Cleanup tests imports --- server/tests/api/activitypub/cleaner.ts | 5 +---- server/tests/api/activitypub/client.ts | 4 +--- server/tests/api/activitypub/fetch.ts | 5 +---- server/tests/api/activitypub/refresher.ts | 1 - server/tests/api/activitypub/security.ts | 4 +--- 5 files changed, 4 insertions(+), 15 deletions(-) (limited to 'server/tests/api/activitypub') diff --git a/server/tests/api/activitypub/cleaner.ts b/server/tests/api/activitypub/cleaner.ts index d0a151f5c..eb6779123 100644 --- a/server/tests/api/activitypub/cleaner.ts +++ b/server/tests/api/activitypub/cleaner.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' -import * as chai from 'chai' +import { expect } from 'chai' import { wait } from '@shared/core-utils' import { cleanupTests, @@ -12,8 +11,6 @@ import { waitJobs } from '@shared/server-commands' -const expect = chai.expect - describe('Test AP cleaner', function () { let servers: PeerTubeServer[] = [] let videoUUID1: string diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts index b12ffe341..90c89138c 100644 --- a/server/tests/api/activitypub/client.ts +++ b/server/tests/api/activitypub/client.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import * as chai from 'chai' +import { expect } from 'chai' import { processViewersStats } from '@server/tests/shared' import { HttpStatusCode, VideoPlaylistPrivacy, WatchActionObject } from '@shared/models' import { @@ -13,8 +13,6 @@ import { setDefaultVideoChannel } from '@shared/server-commands' -const expect = chai.expect - describe('Test activitypub', function () { let servers: PeerTubeServer[] = [] let video: { id: number, uuid: string, shortUUID: string } diff --git a/server/tests/api/activitypub/fetch.ts b/server/tests/api/activitypub/fetch.ts index cc71e82ea..4edabd1d9 100644 --- a/server/tests/api/activitypub/fetch.ts +++ b/server/tests/api/activitypub/fetch.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' -import * as chai from 'chai' +import { expect } from 'chai' import { cleanupTests, createMultipleServers, @@ -11,8 +10,6 @@ import { waitJobs } from '@shared/server-commands' -const expect = chai.expect - describe('Test ActivityPub fetcher', function () { let servers: PeerTubeServer[] diff --git a/server/tests/api/activitypub/refresher.ts b/server/tests/api/activitypub/refresher.ts index bb81d4565..401a09090 100644 --- a/server/tests/api/activitypub/refresher.ts +++ b/server/tests/api/activitypub/refresher.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { wait } from '@shared/core-utils' import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' import { diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts index 5e29b744f..423fefb10 100644 --- a/server/tests/api/activitypub/security.ts +++ b/server/tests/api/activitypub/security.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import * as chai from 'chai' +import { expect } from 'chai' import { buildDigest } from '@server/helpers/peertube-crypto' import { HTTP_SIGNATURE } from '@server/initializers/constants' import { activityPubContextify } from '@server/lib/activitypub/context' @@ -10,8 +10,6 @@ import { buildAbsoluteFixturePath, wait } from '@shared/core-utils' import { HttpStatusCode } from '@shared/models' import { cleanupTests, createMultipleServers, killallServers, PeerTubeServer } from '@shared/server-commands' -const expect = chai.expect - function setKeysOfServer (onServer: PeerTubeServer, ofServer: PeerTubeServer, publicKey: string, privateKey: string) { const url = 'http://localhost:' + ofServer.port + '/accounts/peertube' -- cgit v1.2.3