grunt-simple-mocha
grunt-simple-mocha copied to clipboard
Feature request: specify destination for results
I'm trying to get my mocha tests integrated with Jenkins via the xUnit reporter in mocha. This works fine when using mocha without grunt as I can do this:
mocha -R xunit -r should $WORKSPACE/tests/mocha/*.js > $WORKSPACE/testresults.xml
With grunt, I'd like to do this:
grunt test
// runs simplemocha:production
simplemocha: {
options: {
globals: ['should'],
reporter: 'spec',
timeout: 5000
},
all: {
src: [
// require should...
'node_modules/should/lib/should.js',
// This test can use it!
'tests/mocha/*.js']
},
production: {
options: {
reporter: 'xunit'
},
src: [
// require should...
'node_modules/should/lib/should.js',
// This test can use it!
'tests/mocha/*.js'],
dest: 'tests/mocha.xml'
}
}
I'm after just the XML output, not the "Running "simplemocha:production" (simplemocha) task" console message before it, otherwise Jenkins won't accept the file as valid xUnit.
Thanks for your work on this plugin! I second @steveworkman's request
I would really like to see the destination option for the XUnit reporter, this makes it much more useful when used with Jenkins.