https://cypress.io logo
setupNodeEvents won’t update variables nested in c...
# i-need-help
f
I’m attempting to set a variable in the setupNodeEvents function of my cypress.config.ts. I can successfully modify the config if I set the variables on the parent object, but if I try to update a nested variable (config.env.varname) no change is made. I’m making sure to return the modified config.
The workaround was to initialize the nested vars object outside of the defineConfig() call, update it within setupNodeEvents, then set it on config.env.varsObject = varsObject I'd like to understand why I can't instead update it in place if it's set on config.env to begin with