1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Add tests for npm run scripts

This commit is contained in:
Chocobozzz 2017-09-07 15:27:35 +02:00
parent 04de542abd
commit fdbda9e3d6
25 changed files with 223 additions and 39 deletions

View file

@ -25,8 +25,15 @@ function isTestInstance () {
}
function root () {
// We are in /dist/helpers/utils.js
return join(__dirname, '..', '..', '..')
// We are in /helpers/utils.js
const paths = [ __dirname, '..', '..' ]
// We are under /dist directory
if (process.mainModule.filename.endsWith('.ts') === false) {
paths.push('..')
}
return join.apply(null, paths)
}
function promisify0<A> (func: (cb: (err: any, result: A) => void) => void): () => Promise<A> {