]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/video-playlists.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / video-playlists.ts
index 7dcb4935a30bff2be0535f650419a21d37f27bc8..8090897c11ee330e9034096485eeca5c9887376e 100644 (file)
@@ -1,20 +1,8 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
-import { HttpStatusCode } from '@shared/models'
-import {
-  checkBadCountPagination,
-  checkBadSortPagination,
-  checkBadStartPagination,
-  cleanupTests,
-  createSingleServer,
-  makeGetRequest,
-  PlaylistsCommand,
-  PeerTubeServer,
-  setAccessTokensToServers,
-  setDefaultVideoChannel
-} from '@shared/extra-utils'
+import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared'
 import {
+  HttpStatusCode,
   VideoPlaylistCreate,
   VideoPlaylistCreateResult,
   VideoPlaylistElementCreate,
@@ -23,6 +11,15 @@ import {
   VideoPlaylistReorder,
   VideoPlaylistType
 } from '@shared/models'
+import {
+  cleanupTests,
+  createSingleServer,
+  makeGetRequest,
+  PeerTubeServer,
+  PlaylistsCommand,
+  setAccessTokensToServers,
+  setDefaultVideoChannel
+} from '@shared/server-commands'
 
 describe('Test video playlists API validator', function () {
   let server: PeerTubeServer
@@ -211,7 +208,7 @@ describe('Test video playlists API validator', function () {
       }
     }
     const getUpdate = (params: any, playlistId: number | string) => {
-      return { ...params, playlistId: playlistId }
+      return { ...params, playlistId }
     }
 
     it('Should fail with an unauthenticated user', async function () {
@@ -242,7 +239,7 @@ describe('Test video playlists API validator', function () {
     })
 
     it('Should fail with an incorrect privacy', async function () {
-      const params = getBase({ privacy: 45 })
+      const params = getBase({ privacy: 45 as any })
 
       await command.create(params)
       await command.update(getUpdate(params, playlist.shortUUID))