diff options
Diffstat (limited to 'server/tests/api/moderation')
-rw-r--r-- | server/tests/api/moderation/abuses.ts | 4 | ||||
-rw-r--r-- | server/tests/api/moderation/blocklist-notification.ts | 4 | ||||
-rw-r--r-- | server/tests/api/moderation/blocklist.ts | 4 | ||||
-rw-r--r-- | server/tests/api/moderation/video-blacklist.ts | 4 |
4 files changed, 4 insertions, 12 deletions
diff --git a/server/tests/api/moderation/abuses.ts b/server/tests/api/moderation/abuses.ts index 1c083a3d1..d9c164c43 100644 --- a/server/tests/api/moderation/abuses.ts +++ b/server/tests/api/moderation/abuses.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 { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models' | 4 | import { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models' |
5 | import { | 5 | import { |
6 | AbusesCommand, | 6 | AbusesCommand, |
@@ -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 abuses', function () { | 17 | describe('Test abuses', function () { |
20 | let servers: PeerTubeServer[] = [] | 18 | let servers: PeerTubeServer[] = [] |
21 | let abuseServer1: AdminAbuse | 19 | let abuseServer1: AdminAbuse |
diff --git a/server/tests/api/moderation/blocklist-notification.ts b/server/tests/api/moderation/blocklist-notification.ts index d5d0e5178..eb092a1df 100644 --- a/server/tests/api/moderation/blocklist-notification.ts +++ b/server/tests/api/moderation/blocklist-notification.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 { UserNotificationType } from '@shared/models' | 4 | import { UserNotificationType } 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 | async function checkNotifications (server: PeerTubeServer, token: string, expected: UserNotificationType[]) { | 14 | async function checkNotifications (server: PeerTubeServer, token: string, expected: UserNotificationType[]) { |
17 | const { data } = await server.notifications.list({ token, start: 0, count: 10, unread: true }) | 15 | const { data } = await server.notifications.list({ token, start: 0, count: 10, unread: true }) |
18 | expect(data).to.have.lengthOf(expected.length) | 16 | expect(data).to.have.lengthOf(expected.length) |
diff --git a/server/tests/api/moderation/blocklist.ts b/server/tests/api/moderation/blocklist.ts index ef2c5d7f3..27592e8c5 100644 --- a/server/tests/api/moderation/blocklist.ts +++ b/server/tests/api/moderation/blocklist.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 { UserNotificationType } from '@shared/models' | 4 | import { UserNotificationType } from '@shared/models' |
5 | import { | 5 | import { |
6 | BlocklistCommand, | 6 | BlocklistCommand, |
@@ -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 | async function checkAllVideos (server: PeerTubeServer, token: string) { | 17 | async function checkAllVideos (server: PeerTubeServer, token: string) { |
20 | { | 18 | { |
21 | const { data } = await server.videos.listWithToken({ token }) | 19 | const { data } = await server.videos.listWithToken({ token }) |
diff --git a/server/tests/api/moderation/video-blacklist.ts b/server/tests/api/moderation/video-blacklist.ts index 68823f97a..ad132aa39 100644 --- a/server/tests/api/moderation/video-blacklist.ts +++ b/server/tests/api/moderation/video-blacklist.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 { FIXTURE_URLS } from '@server/tests/shared' | 4 | import { FIXTURE_URLS } from '@server/tests/shared' |
5 | import { sortObjectComparator } from '@shared/core-utils' | 5 | import { sortObjectComparator } from '@shared/core-utils' |
6 | import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models' | 6 | import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models' |
@@ -16,8 +16,6 @@ import { | |||
16 | waitJobs | 16 | waitJobs |
17 | } from '@shared/server-commands' | 17 | } from '@shared/server-commands' |
18 | 18 | ||
19 | const expect = chai.expect | ||
20 | |||
21 | describe('Test video blacklist', function () { | 19 | describe('Test video blacklist', function () { |
22 | let servers: PeerTubeServer[] = [] | 20 | let servers: PeerTubeServer[] = [] |
23 | let videoId: number | 21 | let videoId: number |