/* File: test/unit.test.ts */import{testApiHandler}from'next-test-api-route-handler';// ◄ Must be first import// Import the handler under test from the app directoryimport*asappHandlerfrom'../app/your-endpoint/route';it('does what I want',async()=>{awaittestApiHandler({appHandler...
🔧 Confidently unit and integration test your Next.js API routes/handlers in an isolated Next.js-like environment with buttery-smooth DX - BowlingX/next-test-api-route-handler