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/miscs | |
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/miscs')
-rw-r--r-- | server/tests/utils/miscs/miscs.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/tests/utils/miscs/miscs.ts b/server/tests/utils/miscs/miscs.ts index b0667491b..b2f80e9b1 100644 --- a/server/tests/utils/miscs/miscs.ts +++ b/server/tests/utils/miscs/miscs.ts | |||
@@ -4,7 +4,7 @@ import * as chai from 'chai' | |||
4 | import { isAbsolute, join } from 'path' | 4 | import { isAbsolute, join } from 'path' |
5 | import * as request from 'supertest' | 5 | import * as request from 'supertest' |
6 | import * as WebTorrent from 'webtorrent' | 6 | import * as WebTorrent from 'webtorrent' |
7 | import { readFileBufferPromise } from '../../../helpers/core-utils' | 7 | import { readFile } from 'fs-extra' |
8 | 8 | ||
9 | const expect = chai.expect | 9 | const expect = chai.expect |
10 | let webtorrent = new WebTorrent() | 10 | let webtorrent = new WebTorrent() |
@@ -43,7 +43,7 @@ async function testImage (url: string, imageName: string, imagePath: string, ext | |||
43 | 43 | ||
44 | const body = res.body | 44 | const body = res.body |
45 | 45 | ||
46 | const data = await readFileBufferPromise(join(__dirname, '..', '..', 'fixtures', imageName + extension)) | 46 | const data = await readFile(join(__dirname, '..', '..', 'fixtures', imageName + extension)) |
47 | const minLength = body.length - ((20 * body.length) / 100) | 47 | const minLength = body.length - ((20 * body.length) / 100) |
48 | const maxLength = body.length + ((20 * body.length) / 100) | 48 | const maxLength = body.length + ((20 * body.length) / 100) |
49 | 49 | ||