this has the nice side effect that `npm test` effectively only runs `mocha` and has proper line numbers in stack traces
@@ -1,10 +1,10 @@
language: node_js
node_js:
- "iojs-v1.6.0"
-before_script:
- - cp "lib/config.example.js" "lib/config.js"
before_install:
- sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
+script:
+ - npm run-script test-travis
notifications:
irc:
channels:
@@ -23,7 +23,8 @@
"scripts": {
"postinstall": "cp 'lib/config.example.js' 'lib/config.js'",
"start": "forever -l logs/log.log -o logs/out.log -e logs/error.log -p ./ -a --minUptime 8000 --spinSleepTime 1500 lib/www.js",
- "test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
+ "test": "mocha",
+ "test-travis": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},
"engines": {
"iojs": "1.6.x"