From 4a499464ebf0a3df0fdfc277473af7842ce9c30a Mon Sep 17 00:00:00 2001 From: blagoev Date: Fri, 7 Jul 2017 12:43:02 +0300 Subject: [PATCH] Run admin helper on node only --- tests/js/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/js/index.js b/tests/js/index.js index 1d422cfb..0f78ff10 100644 --- a/tests/js/index.js +++ b/tests/js/index.js @@ -44,7 +44,8 @@ if (Realm.Sync) { function node_require(module) { return require(module); } // If on node, run the async tests -if (typeof process === 'object' && process + '' === '[object process]') { +const isNodeProcess = typeof process === 'object' && process + '' === '[object process]' +if (isNodeProcess) { TESTS.AsyncTests = node_require('./async-tests'); } @@ -74,7 +75,7 @@ exports.registerTests = function(tests) { }; exports.prepare = function(done) { - if (global.testAdminUserInfo) { + if (!isNodeProcess || global.testAdminUserInfo) { done(); }