mirror of https://github.com/zulip/zulip.git
test-js-with-node: Fix return status on failure.
This commit is contained in:
parent
1d6ebd2b3d
commit
82b1218af9
|
@ -9,7 +9,7 @@ INDEX_JS=frontend_tests/zjsunit/index.js
|
|||
NODEJS=$(which nodejs || which node)
|
||||
if [ "$1" = "cover" ]; then
|
||||
# Run a coverage test with Istanbul.
|
||||
istanbul cover "$INDEX_JS" && echo "Test(s) passed. SUCCESS!" || echo "FAIL - Test(s) failed"
|
||||
istanbul cover "$INDEX_JS" && echo "Test(s) passed. SUCCESS!" || (echo "FAIL - Test(s) failed"; exit 1)
|
||||
|
||||
elif [ "$1" = "-h" -o "$1" = "--help" ]; then
|
||||
echo "Usage:
|
||||
|
@ -23,5 +23,5 @@ elif [ "$1" = "-h" -o "$1" = "--help" ]; then
|
|||
else
|
||||
# Normal testing, no coverage analysis.
|
||||
# Run the index.js test runner, which runs all the other tests.
|
||||
"$NODEJS" --stack-trace-limit=100 "$INDEX_JS" $@ && echo "Test(s) passed. SUCCESS!" || echo "FAIL - Test(s) failed"
|
||||
"$NODEJS" --stack-trace-limit=100 "$INDEX_JS" $@ && echo "Test(s) passed. SUCCESS!" || (echo "FAIL - Test(s) failed"; exit 1)
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue