Files
zulip/tools/test-js-with-node
Tim Abbott 7aef6423de Include /usr/lib/nodejs in node search path.
(imported from commit c818905a91a5fe5754a0bddeb12caa00b50bfed3)
2013-12-02 17:49:08 -05:00

17 lines
392 B
Bash
Executable File

#!/bin/bash -e
cd "$(dirname "$0")"/..
export NODE_PATH=/usr/lib/nodejs: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