-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cypress as a node module and multireporters #1357
Comments
Yup this is a bug. The problem is that all of the args have to be serialized into the command line. We'll have to rethink this approach or update our arg serializer / deserializer. |
Related to: #1348 |
maybe connected: when using a configFile (loaded through plugin as described here https://docs.cypress.io/api/plugins/configuration-api.html#Promises ) which contains nested objects like {
"reporter": "mocha-multi-reporters",
"reporterOptions": {
"reporterEnabled": "mocha-junit-reporter Spec",
"mochaJunitReporterReporterOptions": {
"mochaFile": "./reports/report.xml"
}
}
} results in an error
|
brian-mann
added a commit
that referenced
this issue
Jul 29, 2018
…as command line arguments - this avoids needing our own serializer for nested objects such as reporterOptions, config.hosts or config.blacklistHosts - prevent adding additional underscored properties when propagating arguments to electron
1 task
brian-mann
pushed a commit
that referenced
this issue
Jul 30, 2018
- address #2221 - fixes #1357 - fixes #1348 - [x] update test to test `testCaseSwitchClassnameAndName` reporter option https://github.com/cypress-io/cypress/blob/issue-2221/packages/server/test/e2e/reporters_spec.coffee#L38
This was referenced May 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this a Feature or Bug?
Bug
Current behavior:
Using cypress as a node module and passing a config object including a string with a comma results in unexpected behaviour. String including commas is split up and passed as additional properties.
How to reproduce:
Using for eg a multireporter and calling the cypress runner in a nodejs script.
which calls the run function in lib/cypress.js.
After line 22
options = util.normalizeModuleOptions(options);
the passed options object is transformed to
reporter: 'mocha-multi-reporters', reporterOptions: 'reporterEnabled=JSON, Spec,jsonReporterOptions=[object Object]'
which results in the wrong object (eg at open_project.js, function create)
'Spec' is not part of the property reporterEnabled anymore. Also the jsonReporterOptions is not resolved correctly.
The multireporter cannnot handle this wrong object and runs only one reporter.
The text was updated successfully, but these errors were encountered: