1.6.0 • Published 10 years ago
mocha-junit-and-console-reporter v1.6.0
Produces JUnit-style XML test results.
Installation
$ npm install mocha-junit-reporter --save-devor as a global module
$ npm install -g mocha-junit-reporterUsage
Run mocha with mocha-junit-reporter:
$ mocha test --reporter mocha-junit-reporterThis will output a results file at ./test-results.xml.
You may optionally declare an alternate location for results XML file by setting
the environment variable MOCHA_FILE or specifying mochaFile in reporterOptions:
$ MOCHA_FILE=./path_to_your/file.xml mocha test --reporter mocha-junit-reporteror
$ mocha test --reporter mocha-junit-reporter --reporter-options mochaFile=./path_to_your/file.xmlor
var mocha = new Mocha({
reporter: 'mocha-junit-reporter',
reporterOptions: {
mochaFile: './path_to_your/file.xml'
}
});1.6.0
10 years ago