aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/utils.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/helpers/utils.js b/server/helpers/utils.js
index 9c2d402e3..9f27671b6 100644
--- a/server/helpers/utils.js
+++ b/server/helpers/utils.js
@@ -6,7 +6,8 @@ const logger = require('./logger')
6 6
7const utils = { 7const utils = {
8 cleanForExit, 8 cleanForExit,
9 generateRandomString 9 generateRandomString,
10 isTestInstance
10} 11}
11 12
12function generateRandomString (size, callback) { 13function generateRandomString (size, callback) {
@@ -22,6 +23,10 @@ function cleanForExit (webtorrentProcess) {
22 process.kill(-webtorrentProcess.pid) 23 process.kill(-webtorrentProcess.pid)
23} 24}
24 25
26function isTestInstance () {
27 return (process.env.NODE_ENV === 'test')
28}
29
25// --------------------------------------------------------------------------- 30// ---------------------------------------------------------------------------
26 31
27module.exports = utils 32module.exports = utils