1
0
Fork 0
peertube/server/helpers/core-utils.ts
2017-06-11 15:19:43 +02:00

22 lines
446 B
TypeScript

/*
Different from 'utils' because we don't not import other PeerTube modules.
Useful to avoid circular dependencies.
*/
import { join } from 'path'
function isTestInstance () {
return process.env.NODE_ENV === 'test'
}
function root () {
// We are in /dist/helpers/utils.js
return join(__dirname, '..', '..', '..')
}
// ---------------------------------------------------------------------------
export {
isTestInstance,
root
}