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
Mocha reports "expect" reporterOption passed into it #18014
Comments
I believe I'm hitting this, where mocha reporters can't be output to file: // cypress.json
{
"reporter": "json",
"reporterOption": {
"mochaFile": "output.txt"
}
} Cypress package version: 9.6.0 Wondering if there's a way to force an old version of mocha in the meantime... |
Thanks @KamalAman! Pushed this just a little bit further in #21224 😆 |
The breaking commit in mocha: The attempted backward compat that should ideally work for us: mochajs/mocha@9c10ada |
Is there anything we can do to help get this through? |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current behavior
Currently, the Cypress integration with mocha assumes that reporters take in an option called
reporterOptions
howeverreporterOptions
is actually an alias forreporterOption
The current implementation
cypress/packages/server/lib/reporter.js
Line 293 in a6a2c49
The change to the API is stated here mochajs/mocha#4741 (comment)
and documented here: https://mochajs.org/#-reporter-option-option-o-option-reporter-options-option
That being said, you cannot just pass in
reporterOption
instead ofreporterOptions
since some reporters still reference the legacy variable.Desired behavior
Should be able to use any mocha reporter, and it should respect
reporterOptions
Cypress CLI parameter.For example the JSON reporter here uses the new variable
reporterOption
https://github.com/mochajs/mocha/blob/master/lib/reporters/json.jsTest code to reproduce
In the latest version of the JSON version in v9.11 of mocha it has an
output
option. Currently the render options do not get properly passed in.Cypress Version
8.3.1
Other
The proposed change would be to make the following change
The text was updated successfully, but these errors were encountered: