Skip to content

Commit be43c83

Browse files
committed
In e2e: assert flow is correctly showing errors
1 parent c0188d9 commit be43c83

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Diff for: tasks/e2e.sh

+10-7
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,14 @@ cp .gitignore .gitignore.backup
159159
echo "
160160
/* @flow */
161161
var wrong: string = 0;
162-
" >> src/App.js
163-
npm start -- --smoke-test || true
162+
" > src/App.js
163+
cat src/App.backup.js >> src/App.js
164+
CI=true npm run build >> errors.log 2>> errors.log || true
165+
cat errors.log | grep "This type is incompatible with"
164166
test -e .flowconfig
165167
test -d flow-typed
166168
cat .gitignore | grep flow-typed
167-
rm src/App.js .gitignore
169+
rm src/App.js .gitignore errors.log
168170
cp src/App.backup.js src/App.js
169171
cp .gitignore.backup .gitignore
170172
rm src/App.backup.js .gitignore.backup .flowconfig
@@ -210,12 +212,13 @@ cp .gitignore .gitignore.backup
210212
echo "
211213
/* @flow */
212214
var wrong: string = 0;
213-
" >> src/App.js
214-
npm start -- --smoke-test || true
215-
test -e .flowconfig
215+
" > src/App.js
216+
cat src/App.backup.js >> src/App.js
217+
CI=true npm run build >> errors.log 2>> errors.log || true
218+
cat errors.log | grep "This type is incompatible with"
216219
test -d flow-typed
217220
cat .gitignore | grep flow-typed
218-
rm src/App.js .gitignore
221+
rm src/App.js .gitignore errors.log
219222
cp src/App.backup.js src/App.js
220223
cp .gitignore.backup .gitignore
221224
rm src/App.backup.js .gitignore.backup .flowconfig

0 commit comments

Comments
 (0)