PeerTube/server/helpers/core-utils.ts

23 lines
446 B
TypeScript
Raw Normal View History

2017-06-11 15:19:43 +02:00
/*
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
}