|
73 | 73 | fi
|
74 | 74 |
|
75 | 75 | # ******************************************************************************
|
76 |
| -# First, pack react-cy-scripts and create-react-app so we can use them. |
| 76 | +# First, pack react-cy-scripts and create-react-cy-app so we can use them. |
77 | 77 | # ******************************************************************************
|
78 | 78 |
|
79 | 79 | # Pack CLI
|
@@ -110,7 +110,7 @@ cd $temp_app_path
|
110 | 110 | create_react_app --scripts-version=$scripts_path --internal-testing-template=$root_path/packages/react-cy-scripts/fixtures/kitchensink test-kitchensink
|
111 | 111 |
|
112 | 112 | # ******************************************************************************
|
113 |
| -# Now that we used create-react-app to create an app depending on react-cy-scripts, |
| 113 | +# Now that we used create-react-cy-app to create an app depending on react-cy-scripts, |
114 | 114 | # let's make sure all npm scripts are in the working state.
|
115 | 115 | # ******************************************************************************
|
116 | 116 |
|
@@ -158,59 +158,5 @@ E2E_FILE=./build/index.html \
|
158 | 158 | PUBLIC_URL=http://www.example.org/spa/ \
|
159 | 159 | node_modules/.bin/mocha --require babel-register --require babel-polyfill integration/*.test.js
|
160 | 160 |
|
161 |
| -# ****************************************************************************** |
162 |
| -# Finally, let's check that everything still works after ejecting. |
163 |
| -# ****************************************************************************** |
164 |
| - |
165 |
| -# Unlink our preset |
166 |
| -npm unlink $root_path/packages/babel-preset-react-cy-app |
167 |
| - |
168 |
| -# Eject... |
169 |
| -echo yes | npm run eject |
170 |
| - |
171 |
| -# ...but still link to the local packages |
172 |
| -npm link $root_path/packages/babel-preset-react-cy-app |
173 |
| -npm link $root_path/packages/eslint-config-react-app |
174 |
| -npm link $root_path/packages/react-cy-dev-utils |
175 |
| -npm link $root_path/packages/react-cy-scripts |
176 |
| - |
177 |
| -# Test the build |
178 |
| -REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ |
179 |
| - NODE_PATH=src \ |
180 |
| - PUBLIC_URL=http://www.example.org/spa/ \ |
181 |
| - npm run build |
182 |
| - |
183 |
| -# Check for expected output |
184 |
| -exists build/*.html |
185 |
| -exists build/static/js/main.*.js |
186 |
| - |
187 |
| -# Unit tests |
188 |
| -REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ |
189 |
| - CI=true \ |
190 |
| - NODE_PATH=src \ |
191 |
| - NODE_ENV=test \ |
192 |
| - npm test -- --no-cache --testPathPattern="/src/" |
193 |
| - |
194 |
| -# Test "development" environment |
195 |
| -tmp_server_log=`mktemp` |
196 |
| -PORT=3002 \ |
197 |
| - REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ |
198 |
| - NODE_PATH=src \ |
199 |
| - nohup npm start &>$tmp_server_log & |
200 |
| -grep -q 'The app is running at:' <(tail -f $tmp_server_log) |
201 |
| -E2E_URL="http://localhost:3002" \ |
202 |
| - REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ |
203 |
| - CI=true NODE_PATH=src \ |
204 |
| - NODE_ENV=development \ |
205 |
| - node_modules/.bin/mocha --require babel-register --require babel-polyfill integration/*.test.js |
206 |
| - |
207 |
| -# Test "production" environment |
208 |
| -E2E_FILE=./build/index.html \ |
209 |
| - CI=true \ |
210 |
| - NODE_ENV=production \ |
211 |
| - NODE_PATH=src \ |
212 |
| - PUBLIC_URL=http://www.example.org/spa/ \ |
213 |
| - node_modules/.bin/mocha --require babel-register --require babel-polyfill integration/*.test.js |
214 |
| - |
215 | 161 | # Cleanup
|
216 | 162 | cleanup
|
0 commit comments