diff options
Diffstat (limited to 'server/tests/utils/videos/videos.ts')
-rw-r--r-- | server/tests/utils/videos/videos.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts index 973bbbe87..7eee25402 100644 --- a/server/tests/utils/videos/videos.ts +++ b/server/tests/utils/videos/videos.ts | |||
@@ -1,13 +1,14 @@ | |||
1 | /* tslint:disable:no-unused-expression */ | 1 | /* tslint:disable:no-unused-expression */ |
2 | 2 | ||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { existsSync, readFile } from 'fs-extra' | 4 | import { existsSync, readdir, readFile } from 'fs-extra' |
5 | import * as parseTorrent from 'parse-torrent' | 5 | import * as parseTorrent from 'parse-torrent' |
6 | import { extname, join } from 'path' | 6 | import { extname, join } from 'path' |
7 | import * as request from 'supertest' | 7 | import * as request from 'supertest' |
8 | import { | 8 | import { |
9 | buildAbsoluteFixturePath, | 9 | buildAbsoluteFixturePath, |
10 | getMyUserInformation, immutableAssign, | 10 | getMyUserInformation, |
11 | immutableAssign, | ||
11 | makeGetRequest, | 12 | makeGetRequest, |
12 | makePutBodyRequest, | 13 | makePutBodyRequest, |
13 | makeUploadRequest, | 14 | makeUploadRequest, |
@@ -16,7 +17,6 @@ import { | |||
16 | testImage | 17 | testImage |
17 | } from '../' | 18 | } from '../' |
18 | import { VideoDetails, VideoPrivacy } from '../../../../shared/models/videos' | 19 | import { VideoDetails, VideoPrivacy } from '../../../../shared/models/videos' |
19 | import { readdirPromise } from '../../../helpers/core-utils' | ||
20 | import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../initializers' | 20 | import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../initializers' |
21 | import { dateIsValid, webtorrentAdd } from '../index' | 21 | import { dateIsValid, webtorrentAdd } from '../index' |
22 | 22 | ||
@@ -276,7 +276,7 @@ async function checkVideoFilesWereRemoved (videoUUID: string, serverNumber: numb | |||
276 | const directoryExists = existsSync(directoryPath) | 276 | const directoryExists = existsSync(directoryPath) |
277 | expect(directoryExists).to.be.true | 277 | expect(directoryExists).to.be.true |
278 | 278 | ||
279 | const files = await readdirPromise(directoryPath) | 279 | const files = await readdir(directoryPath) |
280 | for (const file of files) { | 280 | for (const file of files) { |
281 | expect(file).to.not.contain(videoUUID) | 281 | expect(file).to.not.contain(videoUUID) |
282 | } | 282 | } |