Support --reporter and --reporter-output when running tests.

When running any Grunt task that runs tests with Mocha, the two
following command line options are now supported:
- --reporter: allows to specify a reporter, default is 'spec'.
- --reporter-output: allows to specify a file where Mocha's output will
  be stored.

These two command line options make it easier to retrieve and parse test
results when tests are run on a continuous integration platform like
Jenkins.

Fixes #4038.
This commit is contained in:
Julien Gilli 2014-09-03 12:50:19 -07:00
parent d93bf82795
commit 454abc51ce

View File

@ -171,8 +171,9 @@ var _ = require('lodash'),
mochacli: {
options: {
ui: 'bdd',
reporter: 'spec',
timeout: '15000'
reporter: grunt.option('reporter') || 'spec',
timeout: '15000',
save: grunt.option('reporter-output')
},
// #### All Unit tests