Disable sync tests on Windows

This commit is contained in:
Yavor Georgiev 2017-10-12 16:06:24 +02:00
parent 87d75b0ca1
commit 5d2ee561a1
No known key found for this signature in database
GPG Key ID: 83FC145DA0CCA9C3
1 changed files with 7 additions and 3 deletions

View File

@ -22,6 +22,13 @@ const Realm = require('realm');
global.enableSyncTests = Realm.Sync; global.enableSyncTests = Realm.Sync;
const isNodeProcess = typeof process === 'object' && process + '' === '[object process]';
function node_require(module) { return require(module); }
if (isNodeProcess && process.platform === 'win32') {
global.enableSyncTests = false;
}
var TESTS = { var TESTS = {
ListTests: require('./list-tests'), ListTests: require('./list-tests'),
LinkingObjectsTests: require('./linkingobjects-tests'), LinkingObjectsTests: require('./linkingobjects-tests'),
@ -46,10 +53,7 @@ if (global.enableSyncTests) {
} }
} }
function node_require(module) { return require(module); }
// If on node, run the async tests // If on node, run the async tests
const isNodeProcess = typeof process === 'object' && process + '' === '[object process]';
if (isNodeProcess) { if (isNodeProcess) {
TESTS.AsyncTests = node_require('./async-tests'); TESTS.AsyncTests = node_require('./async-tests');
} }