diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-27 16:23:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 16:23:34 +0200 |
commit | 62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch) | |
tree | c45c35d35d7a3e32621fba06edc63646930c8efd /server/tests/utils/videos | |
parent | 84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff) | |
download | PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.gz PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.zst PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.zip |
Correctly migrate to fs-extra
Diffstat (limited to 'server/tests/utils/videos')
-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 | } |