-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Coverage gives a false positive with a || branch #841
Comments
Specifically, if I remove this line then I should not have 100% coverage anymore. |
@ljharb I've done some testing with nyc@12.0.2. See https://gist.github.com/coreyfarrell/1a98d9a4d2cbf46854f2c9936dab0c77 for a slightly modified version of your test function and how that is instrumented by NYC. As far as I can tell the coverage data for the I have to think about this more to determine a good solution which would avoid breaking stuff like |
Thanks, that sounds like progress to me :-D |
bump. |
bump |
@ljharb I still don't have a solution for this bug but the stale bot will not be touching this issue again. |
Expected Behavior
The below code will not have 100% coverage, because
keys.length
is never > 1, so the "if" branch of that condition was never exercised.Observed Behavior
The below code is reported as having 100% coverage.
Bonus Points! Code (or Repository) that Reproduces Issue
Forensic Information
Operating System: Mac OS
Environment Information: node 10.1, npm 5.6.
The text was updated successfully, but these errors were encountered: