mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Fix test_javascript e2e tests (#24658)
Summary: Fix regression in JavaScript e2e tests. [General] [Fixed] - Fixed JavaScript e2e tests. Pull Request resolved: https://github.com/facebook/react-native/pull/24658 Differential Revision: D15146466 Pulled By: cpojer fbshipit-source-id: 05baa99e3b1cdd3ef02bc3f97cf2987dd8ba80f4
This commit is contained in:
committed by
Facebook Github Bot
parent
82148da667
commit
b92f30dcc5
@@ -1911,7 +1911,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
BUNDLE_CONFIG = "$(SRCROOT)/../rn-cli.config.js";
|
||||
BUNDLE_CONFIG = "$(SRCROOT)/../metro.config.js";
|
||||
DEVELOPMENT_TEAM = VYK7DLU38Z;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../third-party/boost_1_63_0",
|
||||
@@ -1932,7 +1932,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
BUNDLE_CONFIG = "$(SRCROOT)/../rn-cli.config.js";
|
||||
BUNDLE_CONFIG = "$(SRCROOT)/../metro.config.js";
|
||||
DEVELOPMENT_TEAM = VYK7DLU38Z;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../third-party/boost_1_63_0",
|
||||
|
||||
@@ -135,8 +135,8 @@
|
||||
"react": "16.8.3",
|
||||
"react-test-renderer": "16.8.3",
|
||||
"shelljs": "^0.7.8",
|
||||
"yargs": "^9.0.0",
|
||||
"ws": "^6.1.4"
|
||||
"ws": "^6.1.4",
|
||||
"yargs": "^9.0.0"
|
||||
},
|
||||
"detox": {
|
||||
"test-runner": "jest",
|
||||
|
||||
@@ -94,8 +94,8 @@ if [[ ! -x node && -d ${HOME}/.anyenv/bin ]]; then
|
||||
fi
|
||||
|
||||
# check and assign NODE_BINARY env
|
||||
# shellcheck disable=SC1091
|
||||
source './node-binary.sh'
|
||||
# shellcheck source=/dev/null
|
||||
source "$REACT_NATIVE_DIR/scripts/node-binary.sh"
|
||||
|
||||
[ -z "$NODE_ARGS" ] && export NODE_ARGS=""
|
||||
|
||||
|
||||
@@ -64,6 +64,23 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
if (argv.js) {
|
||||
if (
|
||||
tryExecNTimes(
|
||||
() => {
|
||||
return exec('npm install --save-dev flow-bin').code;
|
||||
},
|
||||
numberOfRetries,
|
||||
() => exec('sleep 10s'),
|
||||
)
|
||||
) {
|
||||
echo('Failed to install Flow');
|
||||
echo('Most common reason is npm registry connectivity, try again');
|
||||
exitCode = 1;
|
||||
throw Error(exitCode);
|
||||
}
|
||||
}
|
||||
|
||||
if (exec('yarn pack').code) {
|
||||
echo('Failed to pack react-native');
|
||||
exitCode = 1;
|
||||
@@ -92,23 +109,10 @@ try {
|
||||
exitCode = 1;
|
||||
throw Error(exitCode);
|
||||
}
|
||||
cp('metro.config.js', 'EndToEndTest/.');
|
||||
cd('EndToEndTest');
|
||||
echo('Installing React Native package');
|
||||
exec(`npm install ${PACKAGE}`);
|
||||
if (
|
||||
tryExecNTimes(
|
||||
() => {
|
||||
return exec('npm install --save-dev flow-bin').code;
|
||||
},
|
||||
numberOfRetries,
|
||||
() => exec('sleep 10s'),
|
||||
)
|
||||
) {
|
||||
echo('Failed to install Flow');
|
||||
echo('Most common reason is npm registry connectivity, try again');
|
||||
exitCode = 1;
|
||||
throw Error(exitCode);
|
||||
}
|
||||
echo('Installing node_modules');
|
||||
if (
|
||||
tryExecNTimes(
|
||||
@@ -291,7 +295,7 @@ try {
|
||||
throw Error(exitCode);
|
||||
}
|
||||
describe('Test: Flow check');
|
||||
if (exec('./node_modules/.bin/flow check').code) {
|
||||
if (exec(path.join(ROOT, '/node_modules/.bin/flow') + ' check').code) {
|
||||
echo('Flow check failed.');
|
||||
exitCode = 1;
|
||||
throw Error(exitCode);
|
||||
|
||||
Reference in New Issue
Block a user