/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import 'mocha'
-import * as chai from 'chai'
-import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
+import { expect } from 'chai'
import { UserNotificationType } from '@shared/models'
-
-const expect = chai.expect
+import {
+ cleanupTests,
+ createMultipleServers,
+ doubleFollow,
+ PeerTubeServer,
+ setAccessTokensToServers,
+ waitJobs
+} from '@shared/server-commands'
async function checkNotifications (server: PeerTubeServer, token: string, expected: UserNotificationType[]) {
const { data } = await server.notifications.list({ token, start: 0, count: 10, unread: true })
}
}
-describe('Test blocklist', function () {
+describe('Test blocklist notifications', function () {
let servers: PeerTubeServer[]
let videoUUID: string
})
it('Should block an account', async function () {
- this.timeout(10000)
-
await servers[0].blocklist.addToMyBlocklist({ token: userToken1, account: 'user3@' + servers[1].host })
await waitJobs(servers)
})
})
it('Should block an account', async function () {
- this.timeout(10000)
-
await servers[0].blocklist.addToMyBlocklist({ token: userToken1, server: servers[1].host })
await waitJobs(servers)
})
})
it('Should block an account', async function () {
- this.timeout(10000)
-
await servers[0].blocklist.addToServerBlocklist({ account: 'user3@' + servers[1].host })
await waitJobs(servers)
})
})
it('Should block an account', async function () {
- this.timeout(10000)
-
await servers[0].blocklist.addToServerBlocklist({ server: servers[1].host })
await waitJobs(servers)
})