Fix showing syntax errors in sync test files

This commit is contained in:
blagoev 2017-05-11 23:31:50 +03:00
parent 315b8c1a7a
commit d0a6ca5db6
1 changed files with 6 additions and 1 deletions

View File

@ -35,11 +35,16 @@ if (!(typeof process === 'object' && process.platform === 'win32')) {
}
// If sync is enabled, run the user tests
let hasSync = false;
try {
Realm.Sync; // This will throw if Sync is disabled.
hasSync = true;
} catch (e) { }
if (hasSync) {
TESTS.UserTests = require('./user-tests');
TESTS.SessionTests = require('./session-tests');
} catch (e) {}
}
function node_require(module) { return require(module); }