Mocha sonar generic test results reporter
npm install mocha-sonar-generic-reporterIt is a fork of mocha-sonar-generic-test-coverage that adds support
for using the reporter alongside others with mocha-multi-reporters
This reporter is only for unit test success/failures verification, to unit test line coverage take a look on istanbul reporter
npm install mocha-sonar-generic-reporter --save-dev
On pure mocha
mocha --reporter mocha-sonar-generic-reporter testFolder
On mocha-test for use with grunt
``javascript`
mochaTest: {
coverage: {
options: {
reporter: 'mocha-sonar-generic-reporter',
quiet: false,
captureFile: null, // default mocha test capture file variable
reporterOptions: {
outputFile: null, // relative path file to capture instead append to captureFile (this file will not get prints at stdout)
useFileFullPath: false // generate report for the files using fullpath
}
}
},
src: [
'test.js'
]
}
}
$ npm install && \
cd demo && \
npm install && \
npm start
xml
long stacktrace
long stacktrace
long stacktrace
``