Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 366e5d3

Browse files
Jack Zhaoiansu
Jack Zhao
authored andcommittedJul 15, 2018
[internal] Separate out kitchensink test into two (facebook#4767)
* support scoped packages for cra --scripts-version option * seperate out kitchensink test * add eject to node 6 testing * travis node 6 eject * fix CI warnings
1 parent 706b319 commit 366e5d3

File tree

8 files changed

+249
-75
lines changed

8 files changed

+249
-75
lines changed
 

‎.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ script:
1414
- 'if [ $TEST_SUITE = "simple" ]; then tasks/e2e-simple.sh; fi'
1515
- 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi'
1616
- 'if [ $TEST_SUITE = "kitchensink" ]; then tasks/e2e-kitchensink.sh; fi'
17+
- 'if [ $TEST_SUITE = "kitchensink-eject" ]; then tasks/e2e-kitchensink-eject.sh; fi'
1718
- 'if [ $TEST_SUITE = "old-node" ]; then tasks/e2e-old-node.sh; fi'
1819
- 'if [ $TEST_SUITE = "monorepos" ]; then tasks/e2e-monorepos.sh; fi'
1920
env:
2021
matrix:
2122
- TEST_SUITE=simple
2223
- TEST_SUITE=installs
2324
- TEST_SUITE=kitchensink
25+
- TEST_SUITE=kitchensink-eject
2426
- TEST_SUITE=monorepos
2527
matrix:
2628
include:
2729
- node_js: 0.10
2830
env: TEST_SUITE=old-node
2931
- node_js: 6
3032
env: TEST_SUITE=kitchensink
33+
- node_js: 6
34+
env: TEST_SUITE=kitchensink-eject

‎appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ environment:
88
test_suite: "installs"
99
- nodejs_version: 8
1010
test_suite: "kitchensink"
11+
- nodejs_version: 8
12+
test_suite: "kitchensink-eject"
1113
- nodejs_version: 8
1214
test_suite: "monorepos"
1315
- nodejs_version: 6
@@ -16,6 +18,8 @@ environment:
1618
test_suite: "installs"
1719
- nodejs_version: 6
1820
test_suite: "kitchensink"
21+
- nodejs_version: 6
22+
test_suite: "kitchensink-eject"
1923
- nodejs_version: 6
2024
test_suite: "monorepos"
2125
cache:

‎packages/react-scripts/fixtures/kitchensink/integration/env.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ describe('Integration', () => {
3535
'x-from-development-env'
3636
);
3737
}
38+
doc.defaultView.close();
3839
});
3940

4041
it('NODE_PATH', async () => {
@@ -43,6 +44,7 @@ describe('Integration', () => {
4344
expect(
4445
doc.getElementById('feature-node-path').childElementCount
4546
).to.equal(4);
47+
doc.defaultView.close();
4648
});
4749

4850
it('PUBLIC_URL', async () => {
@@ -58,6 +60,7 @@ describe('Integration', () => {
5860
expect(
5961
doc.querySelector('head link[rel="shortcut icon"]').getAttribute('href')
6062
).to.equal(`${prefix}/favicon.ico`);
63+
doc.defaultView.close();
6164
});
6265

6366
it('shell env variables', async () => {
@@ -66,6 +69,7 @@ describe('Integration', () => {
6669
expect(
6770
doc.getElementById('feature-shell-env-variables').textContent
6871
).to.equal('fromtheshell.');
72+
doc.defaultView.close();
6973
});
7074

7175
it('expand .env variables', async () => {
@@ -83,6 +87,7 @@ describe('Integration', () => {
8387
expect(
8488
doc.getElementById('feature-expand-env-existing').textContent
8589
).to.equal('fromtheshell');
90+
doc.defaultView.close();
8691
});
8792
});
8893
});

‎packages/react-scripts/fixtures/kitchensink/integration/initDOM.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default feature =>
6262
created: (_, win) =>
6363
win.addEventListener('ReactFeatureDidMount', () => resolve(doc), true),
6464
deferClose: true,
65+
pretendToBeVisual: true,
6566
resourceLoader,
6667
url: `${host}#${feature}`,
6768
virtualConsole: jsdom.createVirtualConsole().sendTo(console),

‎packages/react-scripts/fixtures/kitchensink/integration/syntax.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ describe('Integration', () => {
1616
expect(
1717
doc.getElementById('feature-array-destructuring').childElementCount
1818
).to.equal(4);
19+
doc.defaultView.close();
1920
});
2021

2122
it('array spread', async () => {
@@ -24,6 +25,7 @@ describe('Integration', () => {
2425
expect(
2526
doc.getElementById('feature-array-spread').childElementCount
2627
).to.equal(4);
28+
doc.defaultView.close();
2729
});
2830

2931
it('async/await', async () => {
@@ -32,6 +34,7 @@ describe('Integration', () => {
3234
expect(
3335
doc.getElementById('feature-async-await').childElementCount
3436
).to.equal(4);
37+
doc.defaultView.close();
3538
});
3639

3740
it('class properties', async () => {
@@ -40,6 +43,7 @@ describe('Integration', () => {
4043
expect(
4144
doc.getElementById('feature-class-properties').childElementCount
4245
).to.equal(4);
46+
doc.defaultView.close();
4347
});
4448

4549
it('computed properties', async () => {
@@ -48,6 +52,7 @@ describe('Integration', () => {
4852
expect(
4953
doc.getElementById('feature-computed-properties').childElementCount
5054
).to.equal(4);
55+
doc.defaultView.close();
5156
});
5257

5358
it('custom interpolation', async () => {
@@ -56,6 +61,7 @@ describe('Integration', () => {
5661
expect(
5762
doc.getElementById('feature-custom-interpolation').childElementCount
5863
).to.equal(4);
64+
doc.defaultView.close();
5965
});
6066

6167
it('default parameters', async () => {
@@ -64,6 +70,7 @@ describe('Integration', () => {
6470
expect(
6571
doc.getElementById('feature-default-parameters').childElementCount
6672
).to.equal(4);
73+
doc.defaultView.close();
6774
});
6875

6976
it('destructuring and await', async () => {
@@ -72,6 +79,7 @@ describe('Integration', () => {
7279
expect(
7380
doc.getElementById('feature-destructuring-and-await').childElementCount
7481
).to.equal(4);
82+
doc.defaultView.close();
7583
});
7684

7785
it('generators', async () => {
@@ -80,6 +88,7 @@ describe('Integration', () => {
8088
expect(
8189
doc.getElementById('feature-generators').childElementCount
8290
).to.equal(4);
91+
doc.defaultView.close();
8392
});
8493

8594
it('object destructuring', async () => {
@@ -88,6 +97,7 @@ describe('Integration', () => {
8897
expect(
8998
doc.getElementById('feature-object-destructuring').childElementCount
9099
).to.equal(4);
100+
doc.defaultView.close();
91101
});
92102

93103
it('object spread', async () => {
@@ -96,6 +106,7 @@ describe('Integration', () => {
96106
expect(
97107
doc.getElementById('feature-object-spread').childElementCount
98108
).to.equal(4);
109+
doc.defaultView.close();
99110
});
100111

101112
it('promises', async () => {
@@ -104,6 +115,7 @@ describe('Integration', () => {
104115
expect(doc.getElementById('feature-promises').childElementCount).to.equal(
105116
4
106117
);
118+
doc.defaultView.close();
107119
});
108120

109121
it('rest + default', async () => {
@@ -112,6 +124,7 @@ describe('Integration', () => {
112124
expect(
113125
doc.getElementById('feature-rest-and-default').childElementCount
114126
).to.equal(4);
127+
doc.defaultView.close();
115128
});
116129

117130
it('rest parameters', async () => {
@@ -120,6 +133,7 @@ describe('Integration', () => {
120133
expect(
121134
doc.getElementById('feature-rest-parameters').childElementCount
122135
).to.equal(4);
136+
doc.defaultView.close();
123137
});
124138

125139
it('template interpolation', async () => {
@@ -128,6 +142,7 @@ describe('Integration', () => {
128142
expect(
129143
doc.getElementById('feature-template-interpolation').childElementCount
130144
).to.equal(4);
145+
doc.defaultView.close();
131146
});
132147
});
133148
});

‎packages/react-scripts/fixtures/kitchensink/integration/webpack.test.js

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,63 +11,75 @@ import url from 'url';
1111

1212
const matchCSS = (doc, regexes) => {
1313
if (process.env.E2E_FILE) {
14-
const elements = doc.getElementsByTagName('link');
15-
let href = "";
16-
for (const elem of elements) {
17-
if (elem.rel === 'stylesheet') {
18-
href = elem.href;
19-
}
14+
const elements = doc.getElementsByTagName('link');
15+
let href = '';
16+
for (const elem of elements) {
17+
if (elem.rel === 'stylesheet') {
18+
href = elem.href;
2019
}
21-
resourceLoader(
22-
{ url: url.parse(href) },
23-
(_, textContent) => {
24-
for (const regex of regexes) {
25-
expect(textContent).to.match(regex);
26-
}
27-
}
28-
);
29-
20+
}
21+
resourceLoader({ url: url.parse(href) }, (_, textContent) => {
22+
for (const regex of regexes) {
23+
expect(textContent).to.match(regex);
24+
}
25+
});
3026
} else {
3127
for (let i = 0; i < regexes.length; ++i) {
32-
expect(doc.getElementsByTagName('style')[i].textContent.replace(/\s/g, '')).to.match(regexes[i]);
28+
expect(
29+
doc.getElementsByTagName('style')[i].textContent.replace(/\s/g, '')
30+
).to.match(regexes[i]);
3331
}
3432
}
35-
}
33+
};
3634

3735
describe('Integration', () => {
3836
describe('Webpack plugins', () => {
3937
it('css inclusion', async () => {
4038
const doc = await initDOM('css-inclusion');
41-
matchCSS(doc, [/html\{/, /#feature-css-inclusion\{background:.+;color:.+}/]);
39+
matchCSS(doc, [
40+
/html\{/,
41+
/#feature-css-inclusion\{background:.+;color:.+}/,
42+
]);
43+
doc.defaultView.close();
4244
});
4345

4446
it('css modules inclusion', async () => {
4547
const doc = await initDOM('css-modules-inclusion');
46-
matchCSS(doc, [/.+style_cssModulesInclusion__.+\{background:.+;color:.+}/,
47-
/.+assets_cssModulesIndexInclusion__.+\{background:.+;color:.+}/]);
48+
matchCSS(doc, [
49+
/.+style_cssModulesInclusion__.+\{background:.+;color:.+}/,
50+
/.+assets_cssModulesIndexInclusion__.+\{background:.+;color:.+}/,
51+
]);
52+
doc.defaultView.close();
4853
});
4954

5055
it('scss inclusion', async () => {
5156
const doc = await initDOM('scss-inclusion');
5257
matchCSS(doc, [/#feature-scss-inclusion\{background:.+;color:.+}/]);
58+
doc.defaultView.close();
5359
});
5460

5561
it('scss modules inclusion', async () => {
5662
const doc = await initDOM('scss-modules-inclusion');
57-
matchCSS(doc, [/.+scss-styles_scssModulesInclusion.+\{background:.+;color:.+}/,
58-
/.+assets_scssModulesIndexInclusion.+\{background:.+;color:.+}/]);
59-
63+
matchCSS(doc, [
64+
/.+scss-styles_scssModulesInclusion.+\{background:.+;color:.+}/,
65+
/.+assets_scssModulesIndexInclusion.+\{background:.+;color:.+}/,
66+
]);
67+
doc.defaultView.close();
6068
});
6169

6270
it('sass inclusion', async () => {
6371
const doc = await initDOM('sass-inclusion');
6472
matchCSS(doc, [/#feature-sass-inclusion\{background:.+;color:.+}/]);
73+
doc.defaultView.close();
6574
});
6675

6776
it('sass modules inclusion', async () => {
6877
const doc = await initDOM('sass-modules-inclusion');
69-
matchCSS(doc, [/.+sass-styles_sassModulesInclusion.+\{background:.+;color:.+}/,
70-
/.+assets_sassModulesIndexInclusion.+\{background:.+;color:.+}/]);
78+
matchCSS(doc, [
79+
/.+sass-styles_sassModulesInclusion.+\{background:.+;color:.+}/,
80+
/.+assets_sassModulesIndexInclusion.+\{background:.+;color:.+}/,
81+
]);
82+
doc.defaultView.close();
7183
});
7284

7385
it('graphql files inclusion', async () => {
@@ -78,6 +90,7 @@ describe('Integration', () => {
7890
expect(children[0].textContent.replace(/\s/g, '')).to.equal(
7991
'{"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"test"},"value":{"kind":"StringValue","value":"test","block":false}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"test"},"arguments":[],"directives":[]}]}}]}}],"loc":{"start":0,"end":40,"source":{"body":"{\\ntest(test:\\"test\\"){\\ntest\\n}\\n}\\n","name":"GraphQLrequest","locationOffset":{"line":1,"column":1}}}}'
8092
);
93+
doc.defaultView.close();
8194
});
8295

8396
it('image inclusion', async () => {
@@ -86,6 +99,7 @@ describe('Integration', () => {
8699
expect(doc.getElementById('feature-image-inclusion').src).to.match(
87100
/^data:image\/jpeg;base64.+==$/
88101
);
102+
doc.defaultView.close();
89103
});
90104

91105
it('no ext inclusion', async () => {
@@ -94,6 +108,7 @@ describe('Integration', () => {
94108
expect(doc.getElementById('feature-no-ext-inclusion').href).to.match(
95109
/\/static\/media\/aFileWithoutExt\.[a-f0-9]{8}\.bin$/
96110
);
111+
doc.defaultView.close();
97112
});
98113

99114
it('json inclusion', async () => {
@@ -102,6 +117,7 @@ describe('Integration', () => {
102117
expect(doc.getElementById('feature-json-inclusion').textContent).to.equal(
103118
'This is an abstract.'
104119
);
120+
doc.defaultView.close();
105121
});
106122

107123
it('linked modules', async () => {
@@ -110,13 +126,15 @@ describe('Integration', () => {
110126
expect(doc.getElementById('feature-linked-modules').textContent).to.equal(
111127
'2.0.0'
112128
);
129+
doc.defaultView.close();
113130
});
114131

115132
it('svg inclusion', async () => {
116133
const doc = await initDOM('svg-inclusion');
117134
expect(doc.getElementById('feature-svg-inclusion').src).to.match(
118135
/\/static\/media\/logo\..+\.svg$/
119136
);
137+
doc.defaultView.close();
120138
});
121139

122140
it('svg component', async () => {
@@ -125,11 +143,13 @@ describe('Integration', () => {
125143
expect(doc.getElementById('feature-svg-component').textContent).to.equal(
126144
''
127145
);
146+
doc.defaultView.close();
128147
});
129148

130149
it('svg in css', async () => {
131150
const doc = await initDOM('svg-in-css');
132151
matchCSS(doc, [/\/static\/media\/logo\..+\.svg/]);
152+
doc.defaultView.close();
133153
});
134154

135155
it('unknown ext inclusion', async () => {
@@ -138,6 +158,7 @@ describe('Integration', () => {
138158
expect(doc.getElementById('feature-unknown-ext-inclusion').href).to.match(
139159
/\/static\/media\/aFileWithExt\.[a-f0-9]{8}\.unknown$/
140160
);
161+
doc.defaultView.close();
141162
});
142163
});
143164
});

‎tasks/e2e-kitchensink-eject.sh

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
#!/bin/bash
2+
# Copyright (c) 2015-present, Facebook, Inc.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
# ******************************************************************************
8+
# This is an end-to-end kitchensink test intended to run on CI.
9+
# You can also run it locally but it's slow.
10+
# ******************************************************************************
11+
12+
# Start in tasks/ even if run from root directory
13+
cd "$(dirname "$0")"
14+
15+
# CLI, app, and test module temporary locations
16+
# http://unix.stackexchange.com/a/84980
17+
temp_app_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_app_path'`
18+
temp_module_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_module_path'`
19+
custom_registry_url=http://localhost:4873
20+
original_npm_registry_url=`npm get registry`
21+
original_yarn_registry_url=`yarn config get registry`
22+
23+
function cleanup {
24+
echo 'Cleaning up.'
25+
unset BROWSERSLIST
26+
ps -ef | grep 'react-scripts' | grep -v grep | awk '{print $2}' | xargs kill -9
27+
cd "$root_path"
28+
# TODO: fix "Device or resource busy" and remove ``|| $CI`
29+
rm -rf "$temp_app_path" "$temp_module_path" || $CI
30+
npm set registry "$original_npm_registry_url"
31+
yarn config set registry "$original_yarn_registry_url"
32+
}
33+
34+
# Error messages are redirected to stderr
35+
function handle_error {
36+
echo "$(basename $0): ERROR! An error was encountered executing line $1." 1>&2;
37+
cleanup
38+
echo 'Exiting with error.' 1>&2;
39+
exit 1
40+
}
41+
42+
function handle_exit {
43+
cleanup
44+
echo 'Exiting without error.' 1>&2;
45+
exit
46+
}
47+
48+
# Check for the existence of one or more files.
49+
function exists {
50+
for f in $*; do
51+
test -e "$f"
52+
done
53+
}
54+
55+
# Exit the script with a helpful error message when any error is encountered
56+
trap 'set +x; handle_error $LINENO $BASH_COMMAND' ERR
57+
58+
# Cleanup before exit on any termination signal
59+
trap 'set +x; handle_exit' SIGQUIT SIGTERM SIGINT SIGKILL SIGHUP
60+
61+
# Echo every command being executed
62+
set -x
63+
64+
# Go to root
65+
cd ..
66+
root_path=$PWD
67+
68+
if hash npm 2>/dev/null
69+
then
70+
npm i -g npm@latest
71+
fi
72+
73+
# Bootstrap monorepo
74+
yarn
75+
76+
# ******************************************************************************
77+
# First, publish the monorepo.
78+
# ******************************************************************************
79+
80+
# Start local registry
81+
tmp_registry_log=`mktemp`
82+
nohup npx verdaccio@3.2.0 -c tasks/verdaccio.yaml &>$tmp_registry_log &
83+
# Wait for `verdaccio` to boot
84+
grep -q 'http address' <(tail -f $tmp_registry_log)
85+
86+
# Set registry to local registry
87+
npm set registry "$custom_registry_url"
88+
yarn config set registry "$custom_registry_url"
89+
90+
# Login so we can publish packages
91+
(cd && npx npm-auth-to-token@1.0.0 -u user -p password -e user@example.com -r "$custom_registry_url")
92+
93+
# Publish the monorepo
94+
git clean -df
95+
./tasks/publish.sh --yes --force-publish=* --skip-git --cd-version=prerelease --exact --npm-tag=latest
96+
97+
# ******************************************************************************
98+
# Now that we have published them, create a clean app folder and install them.
99+
# ******************************************************************************
100+
101+
# Install the app in a temporary location
102+
cd $temp_app_path
103+
npx create-react-app --internal-testing-template="$root_path"/packages/react-scripts/fixtures/kitchensink test-kitchensink
104+
105+
# Install the test module
106+
cd "$temp_module_path"
107+
yarn add test-integrity@^2.0.1
108+
109+
# ******************************************************************************
110+
# Now that we used create-react-app to create an app depending on react-scripts,
111+
# let's make sure all npm scripts are in the working state.
112+
# ******************************************************************************
113+
114+
# Enter the app directory
115+
cd "$temp_app_path/test-kitchensink"
116+
117+
# In kitchensink, we want to test all transforms
118+
export BROWSERSLIST='ie 9'
119+
120+
# Link to test module
121+
npm link "$temp_module_path/node_modules/test-integrity"
122+
123+
# ******************************************************************************
124+
# Finally, let's check that everything still works after ejecting.
125+
# ******************************************************************************
126+
127+
# Eject...
128+
echo yes | npm run eject
129+
130+
# Link to test module
131+
npm link "$temp_module_path/node_modules/test-integrity"
132+
133+
# Test the build
134+
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
135+
NODE_PATH=src \
136+
PUBLIC_URL=http://www.example.org/spa/ \
137+
yarn build
138+
139+
# Check for expected output
140+
exists build/*.html
141+
exists build/static/js/main.*.js
142+
143+
# Unit tests
144+
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
145+
CI=true \
146+
NODE_PATH=src \
147+
NODE_ENV=test \
148+
yarn test --no-cache --testPathPattern=src
149+
150+
# Test "development" environment
151+
tmp_server_log=`mktemp`
152+
PORT=3002 \
153+
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
154+
NODE_PATH=src \
155+
nohup yarn start &>$tmp_server_log &
156+
grep -q 'You can now view' <(tail -f $tmp_server_log)
157+
E2E_URL="http://localhost:3002" \
158+
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
159+
CI=true NODE_PATH=src \
160+
NODE_ENV=development \
161+
BABEL_ENV=test \
162+
node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js
163+
164+
# Test "production" environment
165+
E2E_FILE=./build/index.html \
166+
CI=true \
167+
NODE_ENV=production \
168+
BABEL_ENV=test \
169+
NODE_PATH=src \
170+
PUBLIC_URL=http://www.example.org/spa/ \
171+
node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js
172+
173+
# Cleanup
174+
cleanup

‎tasks/e2e-kitchensink.sh

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -161,55 +161,5 @@ E2E_FILE=./build/index.html \
161161
PUBLIC_URL=http://www.example.org/spa/ \
162162
node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js
163163

164-
# ******************************************************************************
165-
# Finally, let's check that everything still works after ejecting.
166-
# ******************************************************************************
167-
168-
# Eject...
169-
echo yes | npm run eject
170-
171-
# Link to test module
172-
npm link "$temp_module_path/node_modules/test-integrity"
173-
174-
# Test the build
175-
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
176-
NODE_PATH=src \
177-
PUBLIC_URL=http://www.example.org/spa/ \
178-
yarn build
179-
180-
# Check for expected output
181-
exists build/*.html
182-
exists build/static/js/main.*.js
183-
184-
# Unit tests
185-
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
186-
CI=true \
187-
NODE_PATH=src \
188-
NODE_ENV=test \
189-
yarn test --no-cache --testPathPattern=src
190-
191-
# Test "development" environment
192-
tmp_server_log=`mktemp`
193-
PORT=3002 \
194-
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
195-
NODE_PATH=src \
196-
nohup yarn start &>$tmp_server_log &
197-
grep -q 'You can now view' <(tail -f $tmp_server_log)
198-
E2E_URL="http://localhost:3002" \
199-
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
200-
CI=true NODE_PATH=src \
201-
NODE_ENV=development \
202-
BABEL_ENV=test \
203-
node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js
204-
205-
# Test "production" environment
206-
E2E_FILE=./build/index.html \
207-
CI=true \
208-
NODE_ENV=production \
209-
BABEL_ENV=test \
210-
NODE_PATH=src \
211-
PUBLIC_URL=http://www.example.org/spa/ \
212-
node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js
213-
214164
# Cleanup
215165
cleanup

0 commit comments

Comments
 (0)
Please sign in to comment.