-
Notifications
You must be signed in to change notification settings - Fork 24
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
Errors when using Mocha 6 + Cypress #56
Comments
Just fixed this and proposed the following 2 PR's #58 My branch tracking the changes, with failing builds with mocha 6 pre and post fix is here https://github.com/YOU54F/cypressio-docker-typescript/pull/15/files If you do want to move up to mocha 6, you can pull my forked branch in the interim, whilst we wait for the maintainers of the source repo to review/merge/release the PR
|
Updated instructions 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. 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 |
1.5.1 now supports the current version of mocha |
Expected behavior
No errors
Actual behavior
Errors when 2nd test suite is run. "Cannot read property xxxx of undefined"
Information about the Issue
Using following packages:
Steps to reproduce the behavior
Follow this guide to setup mocha-multi-reporters in cypress and run a test setup with 2 separate test files using spec and junit reporter.
Workaround
Downgrade to mocha 5.2.0 and everything is working as expected.
The text was updated successfully, but these errors were encountered: