aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/moderation
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 15:44:32 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 15:47:54 +0200
commit863477173efa82a4412d2e522aa46462249f9199 (patch)
tree40f0ae28691780d79acef5ba4dbd2ef0694ce8ff /server/tests/api/moderation
parente0faa8ad6e18ce6248ef1ec93a59dab5b05be468 (diff)
downloadPeerTube-863477173efa82a4412d2e522aa46462249f9199.tar.gz
PeerTube-863477173efa82a4412d2e522aa46462249f9199.tar.zst
PeerTube-863477173efa82a4412d2e522aa46462249f9199.zip
Cleanup tests imports
Diffstat (limited to 'server/tests/api/moderation')
-rw-r--r--server/tests/api/moderation/abuses.ts4
-rw-r--r--server/tests/api/moderation/blocklist-notification.ts4
-rw-r--r--server/tests/api/moderation/blocklist.ts4
-rw-r--r--server/tests/api/moderation/video-blacklist.ts4
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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models' 4import { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models'
5import { 5import {
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
17const expect = chai.expect
18
19describe('Test abuses', function () { 17describe('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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { UserNotificationType } from '@shared/models' 4import { UserNotificationType } from '@shared/models'
5import { 5import {
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
14const expect = chai.expect
15
16async function checkNotifications (server: PeerTubeServer, token: string, expected: UserNotificationType[]) { 14async 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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { UserNotificationType } from '@shared/models' 4import { UserNotificationType } from '@shared/models'
5import { 5import {
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
17const expect = chai.expect
18
19async function checkAllVideos (server: PeerTubeServer, token: string) { 17async 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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { FIXTURE_URLS } from '@server/tests/shared' 4import { FIXTURE_URLS } from '@server/tests/shared'
5import { sortObjectComparator } from '@shared/core-utils' 5import { sortObjectComparator } from '@shared/core-utils'
6import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models' 6import { 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
19const expect = chai.expect
20
21describe('Test video blacklist', function () { 19describe('Test video blacklist', function () {
22 let servers: PeerTubeServer[] = [] 20 let servers: PeerTubeServer[] = []
23 let videoId: number 21 let videoId: number