You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'd like a way to tell that any Node code is running within Cypress. This way we could detect we're running in Cypress by looking for process.env.CYPRESS
Why is this needed?
Someone mentioned wanting the ability to set different babel config when run within Cypress specifically.
Other
No response
The text was updated successfully, but these errors were encountered:
We need to create an example for public consumption that shows cypress component testing alongside jest testing, and we've found that the babel config actually needs to be slightly different in both scenarios.
We're looking for the best way to detect if the babel config is running inside cypress vs otherwise, and it's possible that jest sets an env var we can use for this conditional behavior, but it would be good if we had a cypress-specific way to test if a JS config file is running under cypress vs something else, so our solution could be portable to any scenario where cypress is running alongside some other testing framework.
Right now, we're doing this in our babel.config.js (which works), but we'd like a more "official" way:
if(process.env.CYPRESS_INTERNAL_ENV){// do cypress-specific test things}else{// do jest-specific test things}
What would you like?
We'd like a way to tell that any Node code is running within Cypress. This way we could detect we're running in Cypress by looking for
process.env.CYPRESS
Why is this needed?
Someone mentioned wanting the ability to set different babel config when run within Cypress specifically.
Other
No response
The text was updated successfully, but these errors were encountered: