2013-07-26 20:31:24 +02:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2013-08-20 06:15:41 +02:00
|
|
|
cd "$(dirname "$0")"/..
|
2013-07-27 00:03:46 +02:00
|
|
|
|
2013-08-20 06:15:41 +02:00
|
|
|
export NODE_PATH=static
|
2013-08-01 17:53:10 +02:00
|
|
|
|
2013-08-20 06:15:41 +02:00
|
|
|
INDEX_JS=zerver/tests/frontend/node/index.js
|
2013-07-30 23:54:33 +02:00
|
|
|
NODEJS=$(which nodejs || which node)
|
2013-08-20 06:20:02 +02:00
|
|
|
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
|