-
Notifications
You must be signed in to change notification settings - Fork 107
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
Instrumenting does not work for component tests in Cypress v10 without Babel #615
Comments
Same issue on Cypress 12.8 + Create React App (TypeScript) |
Facing the same issue.
what I did: 1: Installed code-coverage
2: add to cypress/support/index.js file
3: add to cypress/plugins/index.js file
|
Also does not work with version 12 with babel. What could be the issue? JSX? |
For the moment the workaround I applied was to downgrade cypress to 9.7.0. I'm using |
Has anyone fixed it without using |
While Babel is definitely the easiest way to instrument your code it is not required for I would recommend reaching out on Discord as there is likely someone else who has already tackled the same scenario. The majority of public examples do utilize Babel since it's the easiest way (by far!) but the tools linked above are all viable alternatives. As an aside for those asking, here is an example of getting code coverage working on e2e + CT on a CRA project using Typescript. If anyone has a reproducible example of code coverage not working after after ensuring this plugin is configured properly and their code is being correctly instrumented we would be happy to troubleshoot. As-is, this does not appear to be either a defect or a feature request so I am going to close. Please comment with additional information and reproducible example if you disagree and feel this should remain open |
Logs and screenshots
Versions
window.__coverage__
object? Can you paste a screenshot?undefined
for component tests. Prints the proper obj for normal.nyc_output
folder? Is there.nyc_output/out.json
file. Is it empty? Can you paste at least part of it so we can see the keys and file paths?package.json
(nyc
object) or in other NYC config filesDescribe the bug
The code coverage does not work for component testing in v10 without Babel. When I run e2e tests the coverage shows fine. We cannot use babel due to issues outside my reach. I've tried following your tutorials on the browserify approach but it didn't give way. It looks like more of a lack-of edge case feature than something we could correct with config.
The text was updated successfully, but these errors were encountered: