Run admin helper on node only

This commit is contained in:
blagoev 2017-07-07 12:43:02 +03:00
parent 9c63858d29
commit 4a499464eb
1 changed files with 3 additions and 2 deletions

View File

@ -44,7 +44,8 @@ if (Realm.Sync) {
function node_require(module) { return require(module); } function node_require(module) { return require(module); }
// If on node, run the async tests // 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'); TESTS.AsyncTests = node_require('./async-tests');
} }
@ -74,7 +75,7 @@ exports.registerTests = function(tests) {
}; };
exports.prepare = function(done) { exports.prepare = function(done) {
if (global.testAdminUserInfo) { if (!isNodeProcess || global.testAdminUserInfo) {
done(); done();
} }