Skip to content

Commit

Permalink
grunt-coveralls; mocha-lcov-reporter; coverage test output to test/co…
Browse files Browse the repository at this point in the history
…verage dir
  • Loading branch information
raffishquartan committed May 20, 2014
1 parent bf344c3 commit 24f4f15
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ tmp
.settings
*.sublime-workspace
*~
test/coverage.html
test/coverage/*
24 changes: 21 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function(grunt) {
grunt.initConfig({
clean: {
all: {
src: [ "test/tmp", "test/coverage.html", "**/*~", "**/.*~" ]
src: [ "test/tmp", "test/coverage", "**/*~", "**/.*~" ]
}
},

Expand All @@ -34,11 +34,19 @@ module.exports = function(grunt) {
},
src: ["test/**/*.js"]
},
coverage: {
coverage_html: {
options: {
reporter: "html-cov",
quiet: true,
captureFile: "test/coverage.html"
captureFile: "test/coverage/coverage.html"
},
src: ["test/**/*.js"]
},
"mocha-lcov-reporter": {
options: {
reporter: "mocha-lcov-reporter",
quiet: true,
captureFile: "test/coverage/lcov.info"
},
src: ["test/**/*.js"]
},
Expand All @@ -48,12 +56,22 @@ module.exports = function(grunt) {
},
src: ["test/**/*.js"]
}
},

coveralls: {
options: {
force: true
},
all: {
src: "test/coverage/lcov.info"
}
}
});

grunt.loadTasks("tasks");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-coveralls");
grunt.loadNpmTasks("grunt-mocha-test");
grunt.registerTask("test", ["jshint", "mochaTest"]);
grunt.registerTask("default", ["test"]);
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
"grunt": "~0.4.4",
"grunt-contrib-clean": "^0.5.0",
"grunt-contrib-jshint": "^0.9.2",
"grunt-coveralls": "^0.3.0",
"grunt-mocha-test": "^0.10.2",
"mocha-lcov-reporter": "^0.0.1",
"should": "^3.3.1",
"travis-cov": "^0.2.5"
},
Expand Down

0 comments on commit 24f4f15

Please sign in to comment.