zulip/tools/test-js-with-node

17 lines
423 B
Plaintext
Raw Normal View History

#!/bin/bash -e
cd "$(dirname "$0")"/..
export NODE_PATH=/usr/lib/nodejs:static
2015-10-14 00:35:47 +02:00
INDEX_JS=frontend_tests/node_tests/index.js
NODEJS=$(which nodejs || which node)
if [ "$1" = "cover" ]; then
# Run a coverage test with Istanbul.
istanbul cover "$INDEX_JS"
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"
fi