aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/videos/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/videos/videos.ts')
-rw-r--r--server/tests/utils/videos/videos.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index 7eee25402..87c385f38 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -267,10 +267,14 @@ function removeVideo (url: string, token: string, id: number | string, expectedS
267 .expect(expectedStatus) 267 .expect(expectedStatus)
268} 268}
269 269
270async function checkVideoFilesWereRemoved (videoUUID: string, serverNumber: number) { 270async function checkVideoFilesWereRemoved (
271 videoUUID: string,
272 serverNumber: number,
273 directories = [ 'videos', 'thumbnails', 'torrents', 'previews', 'captions' ]
274) {
271 const testDirectory = 'test' + serverNumber 275 const testDirectory = 'test' + serverNumber
272 276
273 for (const directory of [ 'videos', 'thumbnails', 'torrents', 'previews', 'captions' ]) { 277 for (const directory of directories) {
274 const directoryPath = join(root(), testDirectory, directory) 278 const directoryPath = join(root(), testDirectory, directory)
275 279
276 const directoryExists = existsSync(directoryPath) 280 const directoryExists = existsSync(directoryPath)