Skip to content

Commit

Permalink
Catch "No tests found" during CI (#2387)
Browse files Browse the repository at this point in the history
  • Loading branch information
EnoahNetzach authored and gaearon committed May 27, 2017
1 parent 58d8c5c commit 5317b3f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tasks/e2e-kitchensink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
NODE_ENV=test \
npm test -- --no-cache --testPathPattern="/src/"

# Catch when no tests are detected
testsList=$(REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
CI=true \
NODE_PATH=src \
npm test -- --no-cache --testPathPattern="/src/" --listTests)

if [[ ${testsList} =~ "[]" ]]; then
exit 1
fi

# Test "development" environment
tmp_server_log=`mktemp`
PORT=3001 \
Expand Down

0 comments on commit 5317b3f

Please sign in to comment.