Cypress · Middle · Question 75 of 77
What does Cypress.env() read in the browser?
- 1All environment variables of the CI machine
- 2Values from config,
cypress.env.jsonorCYPRESS_vars - 3Only variables listed in the
.envfile of the app
Show the answer
Correct answer: Values from config, cypress.env.json or CYPRESS_ vars
Explanation
Only explicitly exposed values reach the browser. Avoid putting secrets there if specs run with screenshots or videos shared widely.