-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Code coverage with "all" option does not report uncovered source code #1415
Comments
The problem seems to be caused by cypress-io/code-coverage#207 and its related PR cypress-io/code-coverage#208 . See Readme of my updated working example for a (not so nice) workaround to add all source files as additional entries in Cypress' webpack preprocessor: https://github.com/toaditoad/code-coverage-mwe |
I'm glad to see I'm not the only one confused and dismayed by this behavior. |
any new on this? I'm having the same issue trying to get coverage report for tests using |
@toaditoad I also encountered this issue and I believe this is a serious issue of coverage statistics, this causes the code coverage is incorrect. Do you have any workaround to solve this issue for Cypress 12? Thanks in advance. |
I'm not even sure if we use nyc any more. Having a quick look at our project, I can tell that vue 3.4.22, cypress-vite 1.5.0, vite 5.2.9 and vite-plugin-istanbul 5.0.0, vitest 1.5.0 is used. Unfortunately, I don't have the time to generate a new minimal working example. However, we have never found a workaround for the originally reported issue. Code coverage seems fine now but so much has changed that I cannot pinpoint the decisive factor. |
Link to bug demonstration repository
https://github.com/toaditoad/code-coverage-mwe
Expected Behavior
Code coverage should be less than 100% because there is only one test spec
FooPage.spec.js
covering the source code ofFooPage.vue
.BarPage.vue
should be reported as uncovered.Observed Behavior
The code coverage is 100%. The
all
option ofnyc
includes all source code but does not indicate untouched source code (likeBarPage.vue
) as uncovered.Troubleshooting steps
cache: false
in my nyc configEnvironment Information
Possibly related issues
see also https://stackoverflow.com/questions/68194900/cypress-code-coverage-with-nyc-all-option-does-not-report-source-code-as-unco
The text was updated successfully, but these errors were encountered: