import 'mocha'
import * as chai from 'chai'
+import { checkVideoFilesWereRemoved, testCaptionFile } from '@server/tests/shared'
+import { wait } from '@shared/core-utils'
import {
- checkVideoFilesWereRemoved,
cleanupTests,
createMultipleServers,
doubleFollow,
PeerTubeServer,
setAccessTokensToServers,
- testCaptionFile,
- wait,
waitJobs
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
const expect = chai.expect
})
it('Should remove the video, and thus all video captions', async function () {
+ const video = await servers[0].videos.get({ id: videoUUID })
+ const { data: captions } = await servers[0].captions.list({ videoId: videoUUID })
+
await servers[0].videos.remove({ id: videoUUID })
- await checkVideoFilesWereRemoved(videoUUID, servers[0])
+ await checkVideoFilesWereRemoved({ server: servers[0], video, captions })
})
after(async function () {