diff --git a/scripts/test.sh b/scripts/test.sh index 0eea3e7d..766ed8bb 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -109,10 +109,10 @@ open_chrome() { start_packager() { watchman watch-del-all || true - ./node_modules/react-native/packager/packager.sh | tee "$PACKAGER_OUT" & + ./node_modules/react-native/scripts/packager.sh | tee "$PACKAGER_OUT" & while :; do - if grep -Fxq "React packager ready." "$PACKAGER_OUT"; then + if grep -Fxq "Metro Bundler ready." "$PACKAGER_OUT"; then break else echo "Waiting for packager." diff --git a/tests/js/admin-user-helper.js b/tests/js/admin-user-helper.js index e9eaa813..aadce944 100644 --- a/tests/js/admin-user-helper.js +++ b/tests/js/admin-user-helper.js @@ -1,6 +1,7 @@ 'use strict'; +const require_method = require; function node_require(module) { - return require(module); + return require_method(module); } const Realm = node_require('realm'); diff --git a/tests/js/index.js b/tests/js/index.js index 9b9514da..20fa6b5d 100644 --- a/tests/js/index.js +++ b/tests/js/index.js @@ -27,7 +27,8 @@ if( typeof Realm.Sync !== 'undefined' && Realm.Sync !== null ) { } const isNodeProcess = typeof process === 'object' && process + '' === '[object process]'; -function node_require(module) { return require(module); } +const require_method = require; +function node_require(module) { return require_method(module); } if (isNodeProcess && process.platform === 'win32') { global.enableSyncTests = false; diff --git a/tests/js/session-tests.js b/tests/js/session-tests.js index aab58bfb..c7859074 100644 --- a/tests/js/session-tests.js +++ b/tests/js/session-tests.js @@ -27,8 +27,9 @@ const TestCase = require('./asserts'); const isNodeProccess = (typeof process === 'object' && process + '' === '[object process]'); +const require_method = require; function node_require(module) { - return require(module); + return require_method(module); } let tmp; diff --git a/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj b/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj index 774f755b..332547ce 100644 --- a/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj +++ b/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj @@ -829,7 +829,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/tests/react-test-app/package.json b/tests/react-test-app/package.json index 79c063fd..94d3533e 100644 --- a/tests/react-test-app/package.json +++ b/tests/react-test-app/package.json @@ -6,13 +6,14 @@ "start": "react-native start" }, "dependencies": { - "react": "~15.4.0-rc.4", - "react-native": "0.40.0", + "react": "~16.0.0-beta.5", + "react-native": "0.50.3", "react-native-fs": "^1.1.0", "realm": "file:../..", "realm-tests": "file:../js", "xmlbuilder": "^4.2.1" }, + "resolutions": { "moment": "2.19.1" }, "devDependencies": { "babel-preset-react-native": "1.9.1", "invariant": "^2.2.2"