zulip/tools/test-js-with-node

17 lines
376 B
Plaintext
Raw Normal View History

#!/bin/bash -e
cd "$(dirname "$0")"/..
export NODE_PATH=static
INDEX_JS=zerver/tests/frontend/node/index.js
NODEJS=$(which nodejs || which node)
if [ f$1 = fcover ]; 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 $INDEX_JS
fi