aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/miscs
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
commit62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch)
treec45c35d35d7a3e32621fba06edc63646930c8efd /server/tests/utils/miscs
parent84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff)
downloadPeerTube-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.ts4
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'
4import { isAbsolute, join } from 'path' 4import { isAbsolute, join } from 'path'
5import * as request from 'supertest' 5import * as request from 'supertest'
6import * as WebTorrent from 'webtorrent' 6import * as WebTorrent from 'webtorrent'
7import { readFileBufferPromise } from '../../../helpers/core-utils' 7import { readFile } from 'fs-extra'
8 8
9const expect = chai.expect 9const expect = chai.expect
10let webtorrent = new WebTorrent() 10let 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