How can I specify which .env file to use for my dev server when running cypress tests? These are system level env vars not cypress test env vars.
I have an env file that I want to use for my server when running cypress tests: .env.local.cypress
In my package.json file I have:
"dev-server": "nodemon --delay 5ms -e ts,tsx --watch ./src -x ts-node --transpile-only ./src/server",
"cy:run": "cypress run",
"test:e2e:local": "dotenv -e .env.local.cypress -- start-server-and-test dev-server http://localhost:3000 cy:run"
When I run test:e2e:local
the server starts with the correct env vars but the tests do not. Any ideas why?