diff --git a/scripts/run-js-tests.sh b/scripts/run-js-tests.sh new file mode 100755 index 0000000..229da2f --- /dev/null +++ b/scripts/run-js-tests.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Run either as: +# ./scripts/run-js-tests.sh +# ./scripts/run-js-tests.sh reversed + + +if [ "$1" == 'reversed' ]; then + files=$(ls tests/js/*-test.js | perl -e 'print reverse <>') +else + files=$(ls tests/js/*-test.js) +fi + +./node_modules/.bin/mocha --compilers .:tests/js/preprocessor.js $files diff --git a/scripts/travis-test.sh b/scripts/travis-test.sh index 85da9f1..d86b2ec 100755 --- a/scripts/travis-test.sh +++ b/scripts/travis-test.sh @@ -5,7 +5,10 @@ set -o errexit . ./ENV.sh nosetests tests/python -npm test +./scripts/run-js-tests.sh +echo 'Running tests in reverse...' +./scripts/run-js-tests.sh reversed +echo 'Linting...' ./scripts/lint.sh ./scripts/travis-coverage.sh