@@ -111,7 +111,11 @@ create_react_app --scripts-version=$scripts_path --internal-testing-template=$ro
111
111
cd test-kitchensink
112
112
113
113
# Test the build
114
- NODE_PATH=src REACT_APP_SHELL_ENV_MESSAGE=fromtheshell npm run build
114
+ REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
115
+ NODE_PATH=src \
116
+ PUBLIC_URL=http://www.example.org/spa/ \
117
+ npm run build
118
+
115
119
# Check for expected output
116
120
test -e build/* .html
117
121
test -e build/static/js/main.* .js
@@ -127,6 +131,7 @@ tmp_server_log=`mktemp`
127
131
PORT=3001 \
128
132
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
129
133
NODE_PATH=src \
134
+ PUBLIC_URL=http://www.example.org/spa/ \
130
135
nohup npm start & > $tmp_server_log &
131
136
grep -q ' The app is running at:' <( tail -f $tmp_server_log )
132
137
E2E_URL=" http://localhost:3001" \
@@ -138,6 +143,7 @@ E2E_URL="http://localhost:3001" \
138
143
E2E_FILE=./build/index.html \
139
144
CI=true \
140
145
NODE_PATH=src \
146
+ PUBLIC_URL=http://www.example.org/spa/ \
141
147
node_modules/.bin/mocha --require babel-register --require babel-polyfill integration/* .test.js
142
148
143
149
# ******************************************************************************
@@ -157,7 +163,11 @@ npm link $root_path/packages/react-scripts
157
163
rm .babelrc
158
164
159
165
# Test the build
160
- NODE_PATH=src REACT_APP_SHELL_ENV_MESSAGE=fromtheshell npm run build
166
+ REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
167
+ NODE_PATH=src \
168
+ PUBLIC_URL=http://www.example.org/spa/ \
169
+ npm run build
170
+
161
171
# Check for expected output
162
172
test -e build/* .html
163
173
test -e build/static/js/main.* .js
@@ -173,6 +183,7 @@ tmp_server_log=`mktemp`
173
183
PORT=3002 \
174
184
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
175
185
NODE_PATH=src \
186
+ PUBLIC_URL=http://www.example.org/spa/ \
176
187
nohup npm start & > $tmp_server_log &
177
188
grep -q ' The app is running at:' <( tail -f $tmp_server_log )
178
189
E2E_URL=" http://localhost:3002" \
@@ -186,6 +197,7 @@ E2E_FILE=./build/index.html \
186
197
CI=true \
187
198
NODE_ENV=production \
188
199
NODE_PATH=src \
200
+ PUBLIC_URL=http://www.example.org/spa/ \
189
201
node_modules/.bin/mocha --require babel-register --require babel-polyfill integration/* .test.js
190
202
191
203
# Cleanup
0 commit comments