diff options
Diffstat (limited to 'shared/utils/miscs/miscs.ts')
-rw-r--r-- | shared/utils/miscs/miscs.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shared/utils/miscs/miscs.ts b/shared/utils/miscs/miscs.ts index 589daa420..91a93b631 100644 --- a/shared/utils/miscs/miscs.ts +++ b/shared/utils/miscs/miscs.ts | |||
@@ -33,8 +33,8 @@ function webtorrentAdd (torrent: string, refreshWebTorrent = false) { | |||
33 | } | 33 | } |
34 | 34 | ||
35 | function root () { | 35 | function root () { |
36 | // We are in server/tests/utils/miscs | 36 | // We are in /shared/utils/miscs |
37 | return join(__dirname, '..', '..', '..', '..') | 37 | return join(__dirname, '..', '..', '..') |
38 | } | 38 | } |
39 | 39 | ||
40 | async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') { | 40 | async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') { |
@@ -44,7 +44,7 @@ async function testImage (url: string, imageName: string, imagePath: string, ext | |||
44 | 44 | ||
45 | const body = res.body | 45 | const body = res.body |
46 | 46 | ||
47 | const data = await readFile(join(__dirname, '..', '..', 'fixtures', imageName + extension)) | 47 | const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension)) |
48 | const minLength = body.length - ((20 * body.length) / 100) | 48 | const minLength = body.length - ((20 * body.length) / 100) |
49 | const maxLength = body.length + ((20 * body.length) / 100) | 49 | const maxLength = body.length + ((20 * body.length) / 100) |
50 | 50 | ||
@@ -59,7 +59,7 @@ function buildAbsoluteFixturePath (path: string, customTravisPath = false) { | |||
59 | 59 | ||
60 | if (customTravisPath && process.env.TRAVIS) return join(process.env.HOME, 'fixtures', path) | 60 | if (customTravisPath && process.env.TRAVIS) return join(process.env.HOME, 'fixtures', path) |
61 | 61 | ||
62 | return join(__dirname, '..', '..', 'fixtures', path) | 62 | return join(root(), 'server', 'tests', 'fixtures', path) |
63 | } | 63 | } |
64 | 64 | ||
65 | async function generateHighBitrateVideo () { | 65 | async function generateHighBitrateVideo () { |