-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
nyc incorrectly uses --reporter argument passed to wrapped command when called with --all #922
Comments
Adding |
Is this still an issue with the latest nyc? |
Yes it is still an issue, updated the minimal example with latest |
This was partially fixed by yargs/yargs-parser#130. The next release of NYC will include the updated version of yargs-parser. You can monitor #972 for updates about the next release. There is a second issue. Specifically nyc --all=true mocha --reporter=mocha-junit-reporter test*.js
nyc --all true mocha --reporter=mocha-junit-reporter test*.js The following will not work because nyc --all mocha --reporter=mocha-junit-reporter test*.js I'm not sure if yargs-parser has an option to deal with this. Even if it does that would be a potentially breaking change (ignoring argument to |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Link to bug demonstration repository.
See README in the below repository on how to reproduce the issue
https://github.com/frgtn/nyc-all-minimal-example
Expected Behavior
nyc should ignore arguments passed to the wrapped command, eg.
--reporter
:Should produce a coverage report
Observed Behavior
nyc crashes with the following error. From traceback it appears that nyc is trying to use mocha reporter as an istanbul reporter.
Workaround
Calling nyc with
--all -- mocha ...
(note the added--
) seems to be a workaround for the issue.Forensic information
Operating System: Ubuntu Linux 18.04
Environment Information: node v8.10.0, npm 6.1.0
The text was updated successfully, but these errors were encountered: