How to Test NextJS page with Dynamic Route Using Jest
Assuming we have a API route with api/[id]/data First install required library node-mocks-http Next we use createMocks to create a req and res object.
Assuming we have a API route with api/[id]/data First install required library node-mocks-http Next we use createMocks to create a req and res object.