-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
setting process.env to empty object #5042
Comments
Could you please provide what the console.log(process.env) // <-- what does this print to console?
cy.log( "Environment: " + JSON.stringify(process.env,null,4) ); |
Not sure why but |
@amitguptagwl it should be logging to the browser console when you run the tests. |
Thanks @mpahuja . @jennifer-shehane |
i am assuming you have read this? https://docs.cypress.io/guides/guides/environment-variables.html#Setting |
@mpahuja Yes, I did. My question is about why |
Cypress is run in the browser environment, so there will is no access to Node in the browser nor Node's You can access Node, such as |
Impressive that Cypress supports 5 or 6 ways of setting environment variables, but surprising that the uber-popular dotenv is not one of them. There's a plugin for dotenv, but I've wasted the last hour trying to get it to work, to no avail. |
@dandv are you still having issues getting the plugin to work? |
Current behavior:
output in browser console
Desired behavior:
It should not mutate/empty the process.env.
Versions
OS: Ubuntu 18
Cypress: 3.4.1
The text was updated successfully, but these errors were encountered: