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
Environment variables that match a corresponding configuration option will override any value set in the Cypress configuration.
And the note above that section states:
The environment variable CYPRESS_INTERNAL_ENV is reserved and should not be set.
I was surprised when I was unable to get CYPRESS_env to override the env:env value I had set in the cypress.config.js file (specifically so I can set some intercepts when testing locally vs testing in our development instance). I initially thought it was a bug with Cypress (and submitted an issue) but according to @jennifer-shehane :
CYPRESS_env accepts an object as its argument, to override the entire env object. [emphasis mine]
This behavior needs to be documented possibly with a note alongside the one for CYPRESS_INTERNAL_ENV.
The text was updated successfully, but these errors were encountered:
Description
When I
export CYPRESS_env
, I expect that value to override theenv:env
value set in the config file, but nothing happened instead.URL of Issue(s)
https://docs.cypress.io/guides/guides/environment-variables
Steps to replicate
export CYPRESS_env=development
Output will be
Where I would expect it to be
Browser
Chrome 125.0.6422.113
Device
Additional Information
Given the documentation on Environment Variable states:
And the note above that section states:
I was surprised when I was unable to get
CYPRESS_env
to override theenv:env
value I had set in the cypress.config.js file (specifically so I can set some intercepts when testing locally vs testing in our development instance). I initially thought it was a bug with Cypress (and submitted an issue) but according to @jennifer-shehane :This behavior needs to be documented possibly with a note alongside the one for
CYPRESS_INTERNAL_ENV
.The text was updated successfully, but these errors were encountered: