diff options
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/videos/videos.ts | 8 |
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 | ||
270 | async function checkVideoFilesWereRemoved (videoUUID: string, serverNumber: number) { | 270 | async 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) |