diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:44:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:47:54 +0200 |
commit | 863477173efa82a4412d2e522aa46462249f9199 (patch) | |
tree | 40f0ae28691780d79acef5ba4dbd2ef0694ce8ff /server/tests/api/server | |
parent | e0faa8ad6e18ce6248ef1ec93a59dab5b05be468 (diff) | |
download | PeerTube-863477173efa82a4412d2e522aa46462249f9199.tar.gz PeerTube-863477173efa82a4412d2e522aa46462249f9199.tar.zst PeerTube-863477173efa82a4412d2e522aa46462249f9199.zip |
Cleanup tests imports
Diffstat (limited to 'server/tests/api/server')
-rw-r--r-- | server/tests/api/server/auto-follows.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/bulk.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/config-defaults.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/config.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/contact-form.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/email.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/follow-constraints.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/follows-moderation.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/follows.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/handle-down.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/homepage.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/jobs.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/logs.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/plugins.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/proxy.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/services.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/slow-follows.ts | 4 | ||||
-rw-r--r-- | server/tests/api/server/stats.ts | 4 |
18 files changed, 18 insertions, 54 deletions
diff --git a/server/tests/api/server/auto-follows.ts b/server/tests/api/server/auto-follows.ts index 9666e61dd..cdaadb3ad 100644 --- a/server/tests/api/server/auto-follows.ts +++ b/server/tests/api/server/auto-follows.ts | |||
@@ -1,12 +1,10 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { MockInstancesIndex } from '@server/tests/shared' | 4 | import { MockInstancesIndex } from '@server/tests/shared' |
5 | import { wait } from '@shared/core-utils' | 5 | import { wait } from '@shared/core-utils' |
6 | import { cleanupTests, createMultipleServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' | 6 | import { cleanupTests, createMultipleServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' |
7 | 7 | ||
8 | const expect = chai.expect | ||
9 | |||
10 | async function checkFollow (follower: PeerTubeServer, following: PeerTubeServer, exists: boolean) { | 8 | async function checkFollow (follower: PeerTubeServer, following: PeerTubeServer, exists: boolean) { |
11 | { | 9 | { |
12 | const body = await following.follows.getFollowers({ start: 0, count: 5, sort: '-createdAt' }) | 10 | const body = await following.follows.getFollowers({ start: 0, count: 5, sort: '-createdAt' }) |
diff --git a/server/tests/api/server/bulk.ts b/server/tests/api/server/bulk.ts index 560dcc76e..05762c7c2 100644 --- a/server/tests/api/server/bulk.ts +++ b/server/tests/api/server/bulk.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { | 4 | import { |
5 | BulkCommand, | 5 | BulkCommand, |
6 | cleanupTests, | 6 | cleanupTests, |
@@ -11,8 +11,6 @@ import { | |||
11 | waitJobs | 11 | waitJobs |
12 | } from '@shared/server-commands' | 12 | } from '@shared/server-commands' |
13 | 13 | ||
14 | const expect = chai.expect | ||
15 | |||
16 | describe('Test bulk actions', function () { | 14 | describe('Test bulk actions', function () { |
17 | const commentsUser3: { videoId: number, commentId: number }[] = [] | 15 | const commentsUser3: { videoId: number, commentId: number }[] = [] |
18 | 16 | ||
diff --git a/server/tests/api/server/config-defaults.ts b/server/tests/api/server/config-defaults.ts index 47ee4746d..4fa37d0e2 100644 --- a/server/tests/api/server/config-defaults.ts +++ b/server/tests/api/server/config-defaults.ts | |||
@@ -1,12 +1,10 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { FIXTURE_URLS } from '@server/tests/shared' | 4 | import { FIXTURE_URLS } from '@server/tests/shared' |
5 | import { VideoDetails, VideoPrivacy } from '@shared/models' | 5 | import { VideoDetails, VideoPrivacy } from '@shared/models' |
6 | import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands' | 6 | import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands' |
7 | 7 | ||
8 | const expect = chai.expect | ||
9 | |||
10 | describe('Test config defaults', function () { | 8 | describe('Test config defaults', function () { |
11 | let server: PeerTubeServer | 9 | let server: PeerTubeServer |
12 | let channelId: number | 10 | let channelId: number |
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index 2b2b093a7..b8c99e804 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { parallelTests } from '@shared/core-utils' | 4 | import { parallelTests } from '@shared/core-utils' |
5 | import { CustomConfig, HttpStatusCode } from '@shared/models' | 5 | import { CustomConfig, HttpStatusCode } from '@shared/models' |
6 | import { | 6 | import { |
@@ -12,8 +12,6 @@ import { | |||
12 | setAccessTokensToServers | 12 | setAccessTokensToServers |
13 | } from '@shared/server-commands' | 13 | } from '@shared/server-commands' |
14 | 14 | ||
15 | const expect = chai.expect | ||
16 | |||
17 | function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) { | 15 | function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) { |
18 | expect(data.instance.name).to.equal('PeerTube') | 16 | expect(data.instance.name).to.equal('PeerTube') |
19 | expect(data.instance.shortDescription).to.equal( | 17 | expect(data.instance.shortDescription).to.equal( |
diff --git a/server/tests/api/server/contact-form.ts b/server/tests/api/server/contact-form.ts index 3eb6c8548..fcd7f3c4c 100644 --- a/server/tests/api/server/contact-form.ts +++ b/server/tests/api/server/contact-form.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { MockSmtpServer } from '@server/tests/shared' | 4 | import { MockSmtpServer } from '@server/tests/shared' |
5 | import { wait } from '@shared/core-utils' | 5 | import { wait } from '@shared/core-utils' |
6 | import { HttpStatusCode } from '@shared/models' | 6 | import { HttpStatusCode } from '@shared/models' |
@@ -13,8 +13,6 @@ import { | |||
13 | waitJobs | 13 | waitJobs |
14 | } from '@shared/server-commands' | 14 | } from '@shared/server-commands' |
15 | 15 | ||
16 | const expect = chai.expect | ||
17 | |||
18 | describe('Test contact form', function () { | 16 | describe('Test contact form', function () { |
19 | let server: PeerTubeServer | 17 | let server: PeerTubeServer |
20 | const emails: object[] = [] | 18 | const emails: object[] = [] |
diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts index 5ac66225f..1826c268a 100644 --- a/server/tests/api/server/email.ts +++ b/server/tests/api/server/email.ts | |||
@@ -1,12 +1,10 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { MockSmtpServer } from '@server/tests/shared' | 4 | import { MockSmtpServer } from '@server/tests/shared' |
5 | import { HttpStatusCode } from '@shared/models' | 5 | import { HttpStatusCode } from '@shared/models' |
6 | import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' | 6 | import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' |
7 | 7 | ||
8 | const expect = chai.expect | ||
9 | |||
10 | describe('Test emails', function () { | 8 | describe('Test emails', function () { |
11 | let server: PeerTubeServer | 9 | let server: PeerTubeServer |
12 | let userId: number | 10 | let userId: number |
diff --git a/server/tests/api/server/follow-constraints.ts b/server/tests/api/server/follow-constraints.ts index c5c8c8595..5998f58cc 100644 --- a/server/tests/api/server/follow-constraints.ts +++ b/server/tests/api/server/follow-constraints.ts | |||
@@ -1,11 +1,9 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' | 4 | import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' |
5 | import { HttpStatusCode, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' | 5 | import { HttpStatusCode, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' |
6 | 6 | ||
7 | const expect = chai.expect | ||
8 | |||
9 | describe('Test follow constraints', function () { | 7 | describe('Test follow constraints', function () { |
10 | let servers: PeerTubeServer[] = [] | 8 | let servers: PeerTubeServer[] = [] |
11 | let video1UUID: string | 9 | let video1UUID: string |
diff --git a/server/tests/api/server/follows-moderation.ts b/server/tests/api/server/follows-moderation.ts index dc189fec5..deeaac85a 100644 --- a/server/tests/api/server/follows-moderation.ts +++ b/server/tests/api/server/follows-moderation.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { expectStartWith } from '@server/tests/shared' | 4 | import { expectStartWith } from '@server/tests/shared' |
5 | import { ActorFollow, FollowState } from '@shared/models' | 5 | import { ActorFollow, FollowState } from '@shared/models' |
6 | import { | 6 | import { |
@@ -12,8 +12,6 @@ import { | |||
12 | waitJobs | 12 | waitJobs |
13 | } from '@shared/server-commands' | 13 | } from '@shared/server-commands' |
14 | 14 | ||
15 | const expect = chai.expect | ||
16 | |||
17 | async function checkServer1And2HasFollowers (servers: PeerTubeServer[], state = 'accepted') { | 15 | async function checkServer1And2HasFollowers (servers: PeerTubeServer[], state = 'accepted') { |
18 | const fns = [ | 16 | const fns = [ |
19 | servers[0].follows.getFollowings.bind(servers[0].follows), | 17 | servers[0].follows.getFollowings.bind(servers[0].follows), |
diff --git a/server/tests/api/server/follows.ts b/server/tests/api/server/follows.ts index 3ff8c3583..96d39352b 100644 --- a/server/tests/api/server/follows.ts +++ b/server/tests/api/server/follows.ts | |||
@@ -1,12 +1,10 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { completeVideoCheck, dateIsValid, expectAccountFollows, expectChannelsFollows, testCaptionFile } from '@server/tests/shared' | 4 | import { completeVideoCheck, dateIsValid, expectAccountFollows, expectChannelsFollows, testCaptionFile } from '@server/tests/shared' |
5 | import { VideoCreateResult, VideoPrivacy } from '@shared/models' | 5 | import { VideoCreateResult, VideoPrivacy } from '@shared/models' |
6 | import { cleanupTests, createMultipleServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' | 6 | import { cleanupTests, createMultipleServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' |
7 | 7 | ||
8 | const expect = chai.expect | ||
9 | |||
10 | describe('Test follows', function () { | 8 | describe('Test follows', function () { |
11 | let servers: PeerTubeServer[] = [] | 9 | let servers: PeerTubeServer[] = [] |
12 | 10 | ||
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts index 78b3f8560..9ace65ddf 100644 --- a/server/tests/api/server/handle-down.ts +++ b/server/tests/api/server/handle-down.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { completeVideoCheck } from '@server/tests/shared' | 4 | import { completeVideoCheck } from '@server/tests/shared' |
5 | import { wait } from '@shared/core-utils' | 5 | import { wait } from '@shared/core-utils' |
6 | import { HttpStatusCode, JobState, VideoCreateResult, VideoPrivacy } from '@shared/models' | 6 | import { HttpStatusCode, JobState, VideoCreateResult, VideoPrivacy } from '@shared/models' |
@@ -14,8 +14,6 @@ import { | |||
14 | waitJobs | 14 | waitJobs |
15 | } from '@shared/server-commands' | 15 | } from '@shared/server-commands' |
16 | 16 | ||
17 | const expect = chai.expect | ||
18 | |||
19 | describe('Test handle downs', function () { | 17 | describe('Test handle downs', function () { |
20 | let servers: PeerTubeServer[] = [] | 18 | let servers: PeerTubeServer[] = [] |
21 | let threadIdServer1: number | 19 | let threadIdServer1: number |
diff --git a/server/tests/api/server/homepage.ts b/server/tests/api/server/homepage.ts index 1867826d6..9c45800f2 100644 --- a/server/tests/api/server/homepage.ts +++ b/server/tests/api/server/homepage.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { HttpStatusCode } from '@shared/models' | 4 | import { HttpStatusCode } from '@shared/models' |
5 | import { | 5 | import { |
6 | cleanupTests, | 6 | cleanupTests, |
@@ -13,8 +13,6 @@ import { | |||
13 | setDefaultChannelAvatar | 13 | setDefaultChannelAvatar |
14 | } from '../../../../shared/server-commands/index' | 14 | } from '../../../../shared/server-commands/index' |
15 | 15 | ||
16 | const expect = chai.expect | ||
17 | |||
18 | async function getHomepageState (server: PeerTubeServer) { | 16 | async function getHomepageState (server: PeerTubeServer) { |
19 | const config = await server.config.getConfig() | 17 | const config = await server.config.getConfig() |
20 | 18 | ||
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts index 8217da19b..211e32b1e 100644 --- a/server/tests/api/server/jobs.ts +++ b/server/tests/api/server/jobs.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { dateIsValid } from '@server/tests/shared' | 4 | import { dateIsValid } from '@server/tests/shared' |
5 | import { wait } from '@shared/core-utils' | 5 | import { wait } from '@shared/core-utils' |
6 | import { | 6 | import { |
@@ -12,8 +12,6 @@ import { | |||
12 | waitJobs | 12 | waitJobs |
13 | } from '@shared/server-commands' | 13 | } from '@shared/server-commands' |
14 | 14 | ||
15 | const expect = chai.expect | ||
16 | |||
17 | describe('Test jobs', function () { | 15 | describe('Test jobs', function () { |
18 | let servers: PeerTubeServer[] | 16 | let servers: PeerTubeServer[] |
19 | 17 | ||
diff --git a/server/tests/api/server/logs.ts b/server/tests/api/server/logs.ts index 8e626c9df..3b3314d34 100644 --- a/server/tests/api/server/logs.ts +++ b/server/tests/api/server/logs.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { HttpStatusCode } from '@shared/models' | 4 | import { HttpStatusCode } from '@shared/models' |
5 | import { | 5 | import { |
6 | cleanupTests, | 6 | cleanupTests, |
@@ -12,8 +12,6 @@ import { | |||
12 | waitJobs | 12 | waitJobs |
13 | } from '@shared/server-commands' | 13 | } from '@shared/server-commands' |
14 | 14 | ||
15 | const expect = chai.expect | ||
16 | |||
17 | describe('Test logs', function () { | 15 | describe('Test logs', function () { |
18 | let server: PeerTubeServer | 16 | let server: PeerTubeServer |
19 | let logsCommand: LogsCommand | 17 | let logsCommand: LogsCommand |
diff --git a/server/tests/api/server/plugins.ts b/server/tests/api/server/plugins.ts index fbcf4651e..8ac7023eb 100644 --- a/server/tests/api/server/plugins.ts +++ b/server/tests/api/server/plugins.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { pathExists, remove } from 'fs-extra' | 4 | import { pathExists, remove } from 'fs-extra' |
5 | import { join } from 'path' | 5 | import { join } from 'path' |
6 | import { testHelloWorldRegisteredSettings } from '@server/tests/shared' | 6 | import { testHelloWorldRegisteredSettings } from '@server/tests/shared' |
@@ -16,8 +16,6 @@ import { | |||
16 | setAccessTokensToServers | 16 | setAccessTokensToServers |
17 | } from '@shared/server-commands' | 17 | } from '@shared/server-commands' |
18 | 18 | ||
19 | const expect = chai.expect | ||
20 | |||
21 | describe('Test plugins', function () { | 19 | describe('Test plugins', function () { |
22 | let server: PeerTubeServer = null | 20 | let server: PeerTubeServer = null |
23 | let command: PluginsCommand | 21 | let command: PluginsCommand |
diff --git a/server/tests/api/server/proxy.ts b/server/tests/api/server/proxy.ts index 851bed058..a4151ebdd 100644 --- a/server/tests/api/server/proxy.ts +++ b/server/tests/api/server/proxy.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { expectNotStartWith, expectStartWith, FIXTURE_URLS, MockProxy } from '@server/tests/shared' | 4 | import { expectNotStartWith, expectStartWith, FIXTURE_URLS, MockProxy } from '@server/tests/shared' |
5 | import { areObjectStorageTestsDisabled } from '@shared/core-utils' | 5 | import { areObjectStorageTestsDisabled } from '@shared/core-utils' |
6 | import { HttpStatusCode, VideoPrivacy } from '@shared/models' | 6 | import { HttpStatusCode, VideoPrivacy } from '@shared/models' |
@@ -15,8 +15,6 @@ import { | |||
15 | waitJobs | 15 | waitJobs |
16 | } from '@shared/server-commands' | 16 | } from '@shared/server-commands' |
17 | 17 | ||
18 | const expect = chai.expect | ||
19 | |||
20 | describe('Test proxy', function () { | 18 | describe('Test proxy', function () { |
21 | let servers: PeerTubeServer[] = [] | 19 | let servers: PeerTubeServer[] = [] |
22 | let proxy: MockProxy | 20 | let proxy: MockProxy |
diff --git a/server/tests/api/server/services.ts b/server/tests/api/server/services.ts index ed7aca6b6..380308a34 100644 --- a/server/tests/api/server/services.ts +++ b/server/tests/api/server/services.ts | |||
@@ -1,11 +1,9 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands' | 4 | import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands' |
5 | import { Video, VideoPlaylistPrivacy } from '@shared/models' | 5 | import { Video, VideoPlaylistPrivacy } from '@shared/models' |
6 | 6 | ||
7 | const expect = chai.expect | ||
8 | |||
9 | describe('Test services', function () { | 7 | describe('Test services', function () { |
10 | let server: PeerTubeServer = null | 8 | let server: PeerTubeServer = null |
11 | let playlistUUID: string | 9 | let playlistUUID: string |
diff --git a/server/tests/api/server/slow-follows.ts b/server/tests/api/server/slow-follows.ts index 73ac26bf8..a967fa724 100644 --- a/server/tests/api/server/slow-follows.ts +++ b/server/tests/api/server/slow-follows.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { Job } from '@shared/models' | 4 | import { Job } from '@shared/models' |
5 | import { | 5 | import { |
6 | cleanupTests, | 6 | cleanupTests, |
@@ -11,8 +11,6 @@ import { | |||
11 | waitJobs | 11 | waitJobs |
12 | } from '@shared/server-commands' | 12 | } from '@shared/server-commands' |
13 | 13 | ||
14 | const expect = chai.expect | ||
15 | |||
16 | describe('Test slow follows', function () { | 14 | describe('Test slow follows', function () { |
17 | let servers: PeerTubeServer[] = [] | 15 | let servers: PeerTubeServer[] = [] |
18 | 16 | ||
diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.ts index 6dad22aa1..762fc422d 100644 --- a/server/tests/api/server/stats.ts +++ b/server/tests/api/server/stats.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { wait } from '@shared/core-utils' | 4 | import { wait } from '@shared/core-utils' |
5 | import { ActivityType, VideoPlaylistPrivacy } from '@shared/models' | 5 | import { ActivityType, VideoPlaylistPrivacy } from '@shared/models' |
6 | import { | 6 | import { |
@@ -14,8 +14,6 @@ import { | |||
14 | waitJobs | 14 | waitJobs |
15 | } from '@shared/server-commands' | 15 | } from '@shared/server-commands' |
16 | 16 | ||
17 | const expect = chai.expect | ||
18 | |||
19 | describe('Test stats (excluding redundancy)', function () { | 17 | describe('Test stats (excluding redundancy)', function () { |
20 | let servers: PeerTubeServer[] = [] | 18 | let servers: PeerTubeServer[] = [] |
21 | let channelId | 19 | let channelId |