Hi everyone,
I had an issue while I was testing my next js app. My app needs some environment variables to get data. However, I didn't found a way to make my code work...
https://github.com/hugos29dev/the-Project-Alpha/issues/3
Can someone take a look to it...
Hugo
Top comments (2)
You need to load your dotenv in your tests too. Try adding
beforeAll(async () => dotenvLoad())
...before your test.
Thanks,
it works with the code you proposed.
Hugo