I am using Cypress in my react app for integration test. I am facing coverage related problem, coverage report is showing blank.
seems like code is not istrumented properly. can someone help me to figure what's wrong here?
Thanks!
I am using Cypress in my react app for integration test. I am facing coverage related problem, coverage report is showing blank.
seems like code is not istrumented properly. can someone help me to figure what's wrong here?
Thanks!
If you followed the cypress guide https://docs.cypress.io/guides/tooling/code-coverage and still not working, you may need to add the option --exclude-after-remap=false
to your command, for example npx nyc report --reporter=text-summary --exclude-after-remap=false
. You can see they mention that here https://bestofjs.org/projects/istanbul undeer the section 'Source-Map support for pre-instrumented codebases'
If you are using nyc with a project that pre-instruments its code, run nyc with the configuration option --exclude-after-remap set to false. Otherwise nyc's reports will exclude any files that source-maps remap to folders covered under exclude rules.