diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 09:47:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch) | |
tree | eaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /server/tests/api/moderation/blocklist-notification.ts | |
parent | 89d241a79c262b9775c233b73cff080043ebb5e6 (diff) | |
download | PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip |
Use an object to represent a server
Diffstat (limited to 'server/tests/api/moderation/blocklist-notification.ts')
-rw-r--r-- | server/tests/api/moderation/blocklist-notification.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/api/moderation/blocklist-notification.ts b/server/tests/api/moderation/blocklist-notification.ts index 6b56fdd65..fdfbcbced 100644 --- a/server/tests/api/moderation/blocklist-notification.ts +++ b/server/tests/api/moderation/blocklist-notification.ts | |||
@@ -2,12 +2,12 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { cleanupTests, doubleFollow, flushAndRunMultipleServers, ServerInfo, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' | 5 | import { cleanupTests, doubleFollow, createMultipleServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' |
6 | import { UserNotificationType } from '@shared/models' | 6 | import { UserNotificationType } from '@shared/models' |
7 | 7 | ||
8 | const expect = chai.expect | 8 | const expect = chai.expect |
9 | 9 | ||
10 | async function checkNotifications (server: ServerInfo, token: string, expected: UserNotificationType[]) { | 10 | async function checkNotifications (server: PeerTubeServer, token: string, expected: UserNotificationType[]) { |
11 | const { data } = await server.notifications.list({ token, start: 0, count: 10, unread: true }) | 11 | const { data } = await server.notifications.list({ token, start: 0, count: 10, unread: true }) |
12 | expect(data).to.have.lengthOf(expected.length) | 12 | expect(data).to.have.lengthOf(expected.length) |
13 | 13 | ||
@@ -17,7 +17,7 @@ async function checkNotifications (server: ServerInfo, token: string, expected: | |||
17 | } | 17 | } |
18 | 18 | ||
19 | describe('Test blocklist', function () { | 19 | describe('Test blocklist', function () { |
20 | let servers: ServerInfo[] | 20 | let servers: PeerTubeServer[] |
21 | let videoUUID: string | 21 | let videoUUID: string |
22 | 22 | ||
23 | let userToken1: string | 23 | let userToken1: string |
@@ -62,7 +62,7 @@ describe('Test blocklist', function () { | |||
62 | before(async function () { | 62 | before(async function () { |
63 | this.timeout(60000) | 63 | this.timeout(60000) |
64 | 64 | ||
65 | servers = await flushAndRunMultipleServers(2) | 65 | servers = await createMultipleServers(2) |
66 | await setAccessTokensToServers(servers) | 66 | await setAccessTokensToServers(servers) |
67 | 67 | ||
68 | { | 68 | { |