}
function root () {
- // We are in server/tests/utils/miscs
- return join(__dirname, '..', '..', '..', '..')
+ // We are in /shared/utils/miscs
+ return join(__dirname, '..', '..', '..')
}
async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') {
const body = res.body
- const data = await readFile(join(__dirname, '..', '..', 'fixtures', imageName + extension))
+ const data = await readFile(join(root(), 'server', 'tests', 'fixtures', imageName + extension))
const minLength = body.length - ((20 * body.length) / 100)
const maxLength = body.length + ((20 * body.length) / 100)
if (customTravisPath && process.env.TRAVIS) return join(process.env.HOME, 'fixtures', path)
- return join(__dirname, '..', '..', 'fixtures', path)
+ return join(root(), 'server', 'tests', 'fixtures', path)
}
async function generateHighBitrateVideo () {