]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/plugins/plugin-helpers.ts
fix plugin storage return value when storing a Json array
[github/Chocobozzz/PeerTube.git] / server / tests / plugins / plugin-helpers.ts
index 5cb664bda372a96e5f37cbee2b90ac4391e76da9..5d16b28a4eecab3f8e097fc78a82db88c3a071f8 100644 (file)
@@ -2,19 +2,19 @@
 
 import 'mocha'
 import { expect } from 'chai'
-import { HttpStatusCode } from '@shared/models'
 import {
   checkVideoFilesWereRemoved,
   cleanupTests,
-  doubleFollow,
   createMultipleServers,
+  doubleFollow,
   makeGetRequest,
   makePostBodyRequest,
-  PluginsCommand,
   PeerTubeServer,
+  PluginsCommand,
   setAccessTokensToServers,
   waitJobs
 } from '@shared/extra-utils'
+import { HttpStatusCode } from '@shared/models'
 
 function postCommand (server: PeerTubeServer, command: string, bodyArg?: object) {
   const body = { command }
@@ -232,7 +232,7 @@ describe('Test plugin helpers', function () {
       this.timeout(40000)
 
       // Should not throw -> video exists
-      await servers[0].videos.get({ id: videoUUID })
+      const video = await servers[0].videos.get({ id: videoUUID })
       // Should delete the video
       await servers[0].videos.view({ id: videoUUID })
 
@@ -246,7 +246,7 @@ describe('Test plugin helpers', function () {
         if (err.message.includes('exists')) throw err
       }
 
-      await checkVideoFilesWereRemoved(videoUUID, servers[0])
+      await checkVideoFilesWereRemoved({ server: servers[0], video })
     })
 
     it('Should have fetched the video by URL', async function () {