How can I properly unit test NextJS API routes?
Unanswered
Giant panda posted this in #help-forum
Giant pandaOP
I am trying to create some unit tests using Jest to test the NextJS API handlers that receive
NextApiRequest and NextApiResponse parameters. I am running into some troubles when I run the tests, I created this stackoverflow question (https://stackoverflow.com/questions/76781450/error-err-stream-write-after-end-write-after-end-when-testing-nextjs-api-rou) that can be useful to provide more context about the problem that I encounter. Any useful source or GitHub repo that can point me in the right direction would be really appreciated.