From 25378bc866a69002d7447e5edc254ec7e469a1ec Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Oct 2018 16:43:57 +0200 Subject: Delete correctly redundancy files --- server/tests/utils/videos/videos.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/tests/utils/videos') 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 .expect(expectedStatus) } -async function checkVideoFilesWereRemoved (videoUUID: string, serverNumber: number) { +async function checkVideoFilesWereRemoved ( + videoUUID: string, + serverNumber: number, + directories = [ 'videos', 'thumbnails', 'torrents', 'previews', 'captions' ] +) { const testDirectory = 'test' + serverNumber - for (const directory of [ 'videos', 'thumbnails', 'torrents', 'previews', 'captions' ]) { + for (const directory of directories) { const directoryPath = join(root(), testDirectory, directory) const directoryExists = existsSync(directoryPath) -- cgit v1.2.3