Skip to content

Commit

Permalink
Added Grunt option for test reporter.
Browse files Browse the repository at this point in the history
  • Loading branch information
aydrian committed Apr 20, 2015
1 parent 71136d7 commit 4bfa090
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ module.exports = function(grunt) {
var config = {
binPath: './node_modules/.bin'
};

var reporter = grunt.option('reporter') || 'xunit-file';

// Configure existing grunt tasks and create custom ones
grunt.initConfig({
config: config,
Expand All @@ -29,8 +32,7 @@ module.exports = function(grunt) {

shell: {
test: {
command : '<%= config.binPath %>/istanbul cover --report lcov --dir test/reports/ <%= config.binPath %>/_mocha test/spec -- --reporter xunit-file',
//command : '<%= config.binPath %>/istanbul cover --report lcov --dir test/reports/ <%= config.binPath %>/_mocha test/spec -- --reporter spec',
command : '<%= config.binPath %>/istanbul cover --report lcov --dir test/reports/ <%= config.binPath %>/_mocha test/spec -- --reporter ' + reporter,
options : {
stdout : true,
failOnError : true
Expand Down

0 comments on commit 4bfa090

Please sign in to comment.