Skip to content

Commit

Permalink
add coveralls, fixes #145
Browse files Browse the repository at this point in the history
  • Loading branch information
zenozeng committed Sep 21, 2015
1 parent 8ff7b9b commit fb56144
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ before_script:
- sh -e /etc/init.d/xvfb start
addons:
firefox: "39.0"
script: "npm run ci-test"
script: "npm run ci-test && npm run coveralls"
9 changes: 4 additions & 5 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ module.exports = function(config) {
},
reporters: ['progress', 'coverage', 'mocha'],
coverageReporter: {
type : 'html',
dir : 'test/report/coverage/',
subdir: function(browser) {
return browser.toLowerCase().split(/[ /-]/)[0];
}
type: 'lcovonly',
dir : 'test/coverage/',
subdir: '.',
file: 'lcov.info'
},
port: 9876,
colors: true,
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"build-test": "browserify test/unit/index.js --outfile test/unit/bundle.js",
"build-doc": "jsdoc src doc/reference.md -c jsdoc.json -d doc/reference/",
"test": "npm run build & karma start",
"coveralls": "cat ./test/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"ci-test": "./node_modules/.bin/karma start --browsers Firefox --single-run"
},
"devDependencies": {
"browserify-istanbul": "^0.2.1",
"coveralls": "^2.11.4",
"karma": "^0.13.10",
"karma-browserify": "^4.3.0",
"karma-chrome-launcher": "^0.2.0",
Expand Down

0 comments on commit fb56144

Please sign in to comment.