From 5d2ee561a17a394427b0a9096dd44c637b757427 Mon Sep 17 00:00:00 2001 From: Yavor Georgiev Date: Thu, 12 Oct 2017 16:06:24 +0200 Subject: [PATCH] Disable sync tests on Windows --- tests/js/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/js/index.js b/tests/js/index.js index 8feb3d89..3e94538e 100644 --- a/tests/js/index.js +++ b/tests/js/index.js @@ -22,6 +22,13 @@ const Realm = require('realm'); 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 = { ListTests: require('./list-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 -const isNodeProcess = typeof process === 'object' && process + '' === '[object process]'; if (isNodeProcess) { TESTS.AsyncTests = node_require('./async-tests'); }