]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/video-blacklist.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / video-blacklist.ts
index 1f926d227574149c4c57f6f63f22c43cc5be171d..8e9f615965758367ab2cfc614c7132fd4b99443a 100644 (file)
@@ -1,12 +1,10 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
 import { expect } from 'chai'
+import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
+import { HttpStatusCode, VideoBlacklistType } from '@shared/models'
 import {
   BlacklistCommand,
-  checkBadCountPagination,
-  checkBadSortPagination,
-  checkBadStartPagination,
   cleanupTests,
   createMultipleServers,
   doubleFollow,
@@ -15,8 +13,7 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   waitJobs
-} from '@shared/extra-utils'
-import { HttpStatusCode, VideoBlacklistType } from '@shared/models'
+} from '@shared/server-commands'
 
 describe('Test video blacklist API validators', function () {
   let servers: PeerTubeServer[]
@@ -39,14 +36,14 @@ describe('Test video blacklist API validators', function () {
     {
       const username = 'user1'
       const password = 'my super password'
-      await servers[0].users.create({ username: username, password: password })
+      await servers[0].users.create({ username, password })
       userAccessToken1 = await servers[0].login.getAccessToken({ username, password })
     }
 
     {
       const username = 'user2'
       const password = 'my super password'
-      await servers[0].users.create({ username: username, password: password })
+      await servers[0].users.create({ username, password })
       userAccessToken2 = await servers[0].login.getAccessToken({ username, password })
     }
 
@@ -281,7 +278,7 @@ describe('Test video blacklist API validators', function () {
     })
 
     it('Should fail with an invalid type', async function () {
-      await servers[0].blacklist.list({ type: 0, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+      await servers[0].blacklist.list({ type: 0 as any, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
     })
 
     it('Should succeed with the correct parameters', async function () {