Its is a good practice for Next.js?
LksR-dev opened this issue · comments
Im trying TDD with Next.js, supertest and jest. I dont know If Im doing good.
Repo: https://github.com/LksR-dev/crud-nextjs-ts
The process.env.BASE_URL_LOCAL is the localhost, Every time I run the test it makes an actual API call and writes the database.
I'v tried it creating a server like this:
And the test folder:
But doing this way, the app doesn't acknowledges the env variables.