From 4dec71c75ec5dd7b38f5546b863d59ff44f05368 Mon Sep 17 00:00:00 2001 From: jomo Date: Fri, 27 Mar 2015 23:14:30 +0100 Subject: [PATCH] only report coverage to coveralls from travis this has the nice side effect that `npm test` effectively only runs `mocha` and has proper line numbers in stack traces --- .travis.yml | 4 ++-- package.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b0dae38..c865f43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/package.json b/package.json index 72450c6..3fd8bcf 100644 --- a/package.json +++ b/package.json @@ -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"