From 654d0699b2bcbbeaa0c7e864def7c7a5fc74f644 Mon Sep 17 00:00:00 2001 From: Ewan Dennis Date: Tue, 23 Feb 2016 13:11:50 +0000 Subject: [PATCH] Added a mocha test task to the default grunt task --- Gruntfile.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 1bbc852..410b9c2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -45,12 +45,15 @@ module.exports = function(grunt) { } }, shell: { - test: { + coverage: { command : '<%= config.binPath %>/istanbul cover --report lcov --dir test/reports/ <%= config.binPath %>/_mocha test/spec -- --reporter ' + reporter, options : { stdout : true, failOnError : true } + }, + test: { + command: '<%= config.binPath %>/_mocha test/spec' } }, coveralls: { @@ -69,7 +72,8 @@ module.exports = function(grunt) { // grunt test - runs linting and then our unit tests grunt.registerTask('test', [ 'lint', - 'shell:test' + 'shell:test', + 'shell:coverage' ]); // register default grunt command as grunt test