Skip to content

Commit

Permalink
Trying to use Coveralls.
Browse files Browse the repository at this point in the history
  • Loading branch information
twada committed Dec 10, 2013
1 parent 563bc57 commit 84cfedc
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
/js.jar
/TODO.txt
npm-debug.log
/coverage.lcov
/coverage.html
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ expr.js
js.jar
TODO.txt
npm-debug.log
coverage.lcov
coverage.html
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ language: node_js
node_js:
- "0.10"
- "0.8"
script:
- "npm test && npm run-script coveralls"
before_script:
- "npm install -g grunt-cli"
11 changes: 11 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ module.exports = function(grunt) {
reporter: 'dot'
},
src: ['test/**/*.js']
},
coverage: {
options: {
ui: 'tdd',
reporter: 'mocha-lcov-reporter',
require: 'coverage/blanket',
quiet: true,
captureFile: 'coverage.lcov'
},
src: ['test/**/*.js']
}
},
watch: {
Expand All @@ -53,4 +63,5 @@ module.exports = function(grunt) {
});

grunt.registerTask('test', ['jshint', 'mochaTest:unit']);
grunt.registerTask('coverage', ['mochaTest:coverage']);
};
3 changes: 3 additions & 0 deletions coverage/blanket.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require('blanket')({
pattern: '/empower/lib/'
});
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"url": "http://github.com/twada"
},
"scripts": {
"test": "grunt test"
"test": "grunt test",
"coveralls": "grunt coverage && cat ./coverage.lcov | ./node_modules/coveralls/bin/coveralls.js"
},
"main": "./lib/empower",
"directories": {
Expand All @@ -33,7 +34,10 @@
"grunt-mocha-test": "~0.8.1",
"grunt-contrib-jshint": "~0.7.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-bump": "0.0.11"
"grunt-bump": "~0.0.13",
"mocha-lcov-reporter": "~0.0.1",
"blanket": "~1.1.5",
"coveralls": "~2.6.0"
},
"licenses": [
{
Expand Down

0 comments on commit 84cfedc

Please sign in to comment.