Comments (3)
Thanks for this detailed report! I knew there'd be some cases I was overlooking. I'll investigate tonight.
UPDATE: Ah, I see. I couldn't replicate this with npx node@21 node_modules/.bin/jest
or npx node@20 node_modules/.bin/jest
but it did pop up with npx node@18 node_modules/.bin/jest
. Seems the test still passes even with the hang. There is likely some node@18 related issue with no backported fix.
from next-test-api-route-handler.
Turns out later versions of Node terminate persistent server connections more optimally than Node@18 does. Explicitly calling server.closeAllConnections()
after calling server.close()
did the trick.
Thanks again for opening this issue, I learned from fixing this.
from next-test-api-route-handler.
🎉 This issue has been resolved in version 4.0.3 🎉
The release is available on:
Your semantic-release bot 📦🚀
from next-test-api-route-handler.
Related Issues (20)
- Relative URL doesn't work with appHandler: "Invalid URL" error HOT 4
- Insuffient type for `params` object given a well-typed dynamic route handler HOT 1
- Potential NTARH incompatibility with `next/jest.js` HOT 1
- Support for edge function API HOT 2
- Test file-uploading API Endpoint
- ValidationPipe not triggering in unit tests HOT 4
- next-test-api-route-handler (NTARH) failed to import api-utils.js HOT 2
- Verify support for app-based route handlers HOT 1
- Error: Invariant: Method expects to have requestAsyncStorage, none available HOT 3
- Incompatibility with [email protected] HOT 5
- Could not find a declaration file for module 'next-test-api-route-handler'. HOT 4
- Doesn't work in node 20.8.0 to 20.x HOT 7
- Bypassing MSW does not work with MSW 2.X HOT 2
- Vercel lambda governing compatibility badge isn't tracking latest compat version anymore HOT 1
- App Router Examples HOT 2
- Drop node-fetch in favor of native fetch functionality HOT 1
- Catch all segments dynamic api routes HOT 1
- Recursive redirection occurs when redirecting within the handler HOT 3
- ReferenceError: Request is not defined HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next-test-api-route-handler.