I have an application that depends on environmental variables like: const APP_PORT = process.env.APP_PORT || 8080; And I would like to test that for example: APP_PORT can be set by a Node.js environment variable. or that an Express.js application is running on the port set with process.env.APP_PORT How can I achieve this with Jest? Can I set these process.env variables before each test or should I
![Test process.env with Jest](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)