Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Add coverage reporting for mocha server side tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgestar committed Oct 11, 2013
1 parent 2d4a8c5 commit 88fa4ca
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-contrib-jst');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-mocha-cov');
grunt.loadNpmTasks('grunt-karma');

grunt.initConfig({
Expand All @@ -21,7 +22,18 @@ module.exports = function (grunt) {
mochaTest: {
jsbox_apps: {
src: ['<%= paths.tests.jsbox_apps.spec %>'],
}
reporter: 'dot',
},
},
mochacov: {
jsbox_apps: {
files: ['<%= paths.tests.jsbox_apps.spec %>'],
options: {
reporter: 'mocha-lcov-reporter',
coverage: true,
quiet: true,
},
},
},
jst: {
options: {
Expand Down Expand Up @@ -55,7 +67,8 @@ module.exports = function (grunt) {
});

grunt.registerTask('test:jsbox_apps', [
'mochaTest:jsbox_apps'
'mochaTest:jsbox_apps',
'mochacov:jsbox_apps'
]);

grunt.registerTask('test:client', [
Expand Down

0 comments on commit 88fa4ca

Please sign in to comment.