-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
junit-reporter does not support mocha 6 #78
Comments
Experiencing the same issue. Pinning to mocha 5.2.0 works, but using 6.0.x results in a failure |
Same problem here
|
Hi, I have 2 PR's tracking this upgrade to mocha 6, I use cypress & mochawesome for reporting. They have circleci runs associated with them, in case anyone wants to track the change as the other dependancies update. I haven't had a chance to look into this yet in much detail YOU54F/template-cypress-docker-typescript#15 |
I've now updated, tested and released updated modules that fix this with mocha 6, but also retains backwards compatibility with mocha 5 and earlier versions. (tested with mocha 6.0.0 / latest and 5.2.0) https://www.npmjs.com/package/cypress-multi-reporters Example against Mocha 5 the changes required are minimal
in reporterOpts.json {
"reporterEnabled": "mocha-junit-reporters, mochawesome",
"mochaJunitReportersReporterOptions": {
"mochaFile": "cypress/reports/junit/test_results[hash].xml",
"toConsole": false
},
"mochawesomeReporterOptions": {
"reportDir": "cypress/reports/mocha",
"quiet": true,
"overwrite": false,
"html": false,
"json": true
}
} in cypress.json {
...
"reporter": "cypress-multi-reporters",
"reporterOptions": {
"configFile": "reporterOpts.json"
} See https://github.com/YOU54F/cypress-docker-typescript/pull/22/files for this fix applied, I have teste Hopefully the PR's will be merged in the source repo's soon but for now, enjoy |
This config worked for me
|
💡 Mocha 6 now natively supports XUnit-style reports via the
This got me up and running when I ran into the snag other folks have mentioned above when using the current latest version of Mocha. |
@canterberry great news :) btw I have updated my comment above, with a released npm packages that will support mocha 6 and below. I couldn't wait for the PR to get merged and lots of people were after mocha 6 support |
This should be resolved now in this repo! 🙌 The fix for mocha-junit-reporter has now been merged and is available in the newly released v1.23.0 https://github.com/michaelleeallen/mocha-junit-reporter/releases/tag/v1.23.0 |
Has anyone got this to work (with package.json
mocha-config.json
This combination fails with (while using v1.23.0 of
If I replace
|
Mocha-multi-reporters still doesn’t have the fix in... Try using mocha-junit-reporter directly or try cypress-multi-reporters, as per my instructions as that also contains the fix |
That combination worked. |
@IdanAdar cool, do you want to close this issue now? |
Whenever attempting to use this reporter with the latest mocha, mocha fails. With previous releases of mocha, it did not.
The text was updated successfully, but these errors were encountered: