Replies: 4 comments 1 reply
-
did you get any answer ? @MenaiAla |
Beta Was this translation helpful? Give feedback.
1 reply
-
I have a same question |
Beta Was this translation helpful? Give feedback.
0 replies
-
Linking with upstream issue: cypress-io/code-coverage#583 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I used the swc-plugin. You can find the solution on Stackoverflow. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Font optimization (next/font), SWC transpilation
Link to the code that reproduces this issue or a replay of the bug
.
To Reproduce
I integrated Cypress into my project for testing, and everything went well, however, when I want to make code coverage I could not find a solution for my issue.
In NextJS 13, it does not support
.babelrc
but SWC, however Istanbul requires.babelrc
as configuration!Please read this GitHub discussion
If I configure
.babelrc
and run my cypress and build scripts:They work well.
However, when I run
npm run dev
:I got an error:
for the build script I used the solution but I see it as a tricky solution.
2 Alternative
If I change the
.babelrc.js
to.babelrc.build.js
, thenpm run dev
works well because it ignore the babel file but the cypress failed:npm run cypress-run-component
Please, how to make code coverage in NextJS 13 with Cypress?
cypress.config.ts
next.config.ts
Describe the Bug
.
Expected Behavior
.
Which browser are you using? (if relevant)
Chrome
How are you deploying your application? (if relevant)
No response
Beta Was this translation helpful? Give feedback.
All reactions