@@ -143,6 +143,7 @@ test -e build/static/js/*.js
143
143
test -e build/static/css/* .css
144
144
test -e build/static/media/* .svg
145
145
test -e build/favicon.ico
146
+ test ! -e .flowconfig
146
147
147
148
# Run tests with CI flag
148
149
CI=true npm test
@@ -152,6 +153,23 @@ CI=true npm test
152
153
# Test the server
153
154
npm start -- --smoke-test
154
155
156
+ # Test optional flow enabling
157
+ cp src/App.js src/App.backup.js
158
+ cp .gitignore .gitignore.backup
159
+ echo "
160
+ /* @flow */
161
+ var wrong: string = 0;
162
+ " >> src/App.js
163
+ npm start -- --smoke-test || true
164
+ test -e .flowconfig
165
+ test -d flow-typed
166
+ cat .gitignore | grep flow-typed
167
+ rm src/App.js .gitignore
168
+ cp src/App.backup.js src/App.js
169
+ cp .gitignore.backup .gitignore
170
+ rm src/App.backup.js .gitignore.backup .flowconfig
171
+ rm -rf flow-typed
172
+
155
173
# ******************************************************************************
156
174
# Finally, let's check that everything still works after ejecting.
157
175
# ******************************************************************************
@@ -173,6 +191,7 @@ test -e build/static/js/*.js
173
191
test -e build/static/css/* .css
174
192
test -e build/static/media/* .svg
175
193
test -e build/favicon.ico
194
+ test ! -e .flowconfig
176
195
177
196
# Run tests, overring the watch option to disable it.
178
197
# `CI=true npm test` won't work here because `npm test` becomes just `jest`.
@@ -185,6 +204,22 @@ npm test -- --watch=no
185
204
# Test the server
186
205
npm start -- --smoke-test
187
206
207
+ # Test optional flow enabling
208
+ cp src/App.js src/App.backup.js
209
+ cp .gitignore .gitignore.backup
210
+ echo "
211
+ /* @flow */
212
+ var wrong: string = 0;
213
+ " >> src/App.js
214
+ npm start -- --smoke-test || true
215
+ test -e .flowconfig
216
+ test -d flow-typed
217
+ cat .gitignore | grep flow-typed
218
+ rm src/App.js .gitignore
219
+ cp src/App.backup.js src/App.js
220
+ cp .gitignore.backup .gitignore
221
+ rm src/App.backup.js .gitignore.backup .flowconfig
222
+ rm -rf flow-typed
188
223
189
224
# ******************************************************************************
190
225
# Test --scripts-version with a version number
0 commit comments