-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cypress Code Coverage and nextjs #19131
Comments
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
Anyone have any ideas why the check, main-linux is failing on my PR. There seems to be a problem in storybook creation. It looks like a lot of people are having the same problem as me. Is this getting resolved somewhere? I'm updating my PR with the latest main, hopefully someone has fixed this. |
Never mind, something must have gotten fixed, I just updated from |
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
…set` Currently nextjs only uses the *swa* compiler To use @cypress/code-coverage you need to use *babel*, you can now select which compiler to use. closed nrwl#19131
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. |
Description
I would like Cypress Code Coverage to work in a next project when using
nxComponentTestingPreset
. Currently it works if you are using a react project and importingnxComponentTestingPreset
from@nx/react/plugins/component-testing
, but tests usingNavLink
fail because they are missingprocess
.There is a slight difference in
nxComponentTestingPreset
between next and react. They use a differentcompiler
. next uses swc and react uses babel. If I change my local code innext/plugins/compoent-testing.js
to use babel instead of swc I get proper code coverage results in next.Motivation
Having Cypress Code Coverage working in a next project would be nice, and something the company I work for is striving to implement coverage requirements.
Suggested Implementation
I imagine adding a
compiler
property toNxComponentTestingOptions
and if it is set use that property here compiler: 'swc'I would change
to
And add
compiler
as an optional property onNxComponentTestingOptions
.Alternate Implementations
Just change it to be
compiler: 'babel'
so it matches the react configuration.The text was updated successfully, but these errors were encountered: