diff --git a/tests/js/index.js b/tests/js/index.js index 5ad9b114..5b6580f8 100644 --- a/tests/js/index.js +++ b/tests/js/index.js @@ -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); }