Closed nnsay closed 1 year ago
Hey there! :)
There are two problems with your current setup.
As stated in the Cypress Documentation, you need instrument your code yourself for the code coverage to take effect: https://docs.cypress.io/guides/tooling/code-coverage#Instrumenting-code
You use vite
to build your cypress and storybook setup. Using istanbul
to instrument your code with vite requires using vite-istanbul-plugin
but there's an open issue on that plugin with compatibility with nx repos: https://github.com/iFaxity/vite-plugin-istanbul/issues/94
Unfortunately, these are tools that we do not control and the issues lie outside the scope of Nx. Therefore, I'm going to close this issue.
You should raise an issue on the cypress repo and follow along with the issue listed above for vite-istanbul-plugin
.
Trace the reason at: https://github.com/cypress-io/code-coverage/issues/657
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
cypress e2e test can generate the coverage report files
Expected Behavior
cypress e2e test can not generate the coverage report files
GitHub Repo
https://github.com/nnsay/nx-example
Steps to Reproduce
I add the e2e in the existing Nx project which name is tools.
Nx Report
Failure Logs
Operating System
Additional Information
No response