fresh-doctor-14925
12/05/2022, 8:51 AMCypress.env('ENVIRONMENT') within your specs, but cypress.config.ts runs in node as part of the setup process, so you don't have access to the Cypress object yet
If you need to get it in there, you can reach it with process.env.CYPRESS_ENVIRONMENT, though at that point I'd probably just pass it in as ENVIRONMENT.
You can also take that variable and assign it to so that you can access it in Cypress.env later:
setupNodeEvents(_on, config) {
config.env.ENVIRONMENT = process.env.ENVIRONMENT;
return config;
},
Hope that helps!