Repository navigation
Conversation
nock 15 reads a two-argument reply callback as the callback style, so those tests hung. Reply callbacks now take the Request argument, and the concurrency tests hold the response headers with an async reply because delay() only delays the response body now.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2805 +/- ##
==========================================
- Coverage 89.25% 89.22% -0.03%
==========================================
Files 65 65
Lines 10562 10562
Branches 489 489
==========================================
- Hits 9427 9424 -3
- Misses 1103 1105 +2
- Partials 32 33 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
note: Closing for now, because nock 15 requires Node.js 22.20 or later and we still support Node.js 20. #2806 holds nock at 14.x and links back here, so these test changes are easy to pick up once Node.js 20 support is dropped. |
Summary
This pull request moves the
web-apiandwebhookpackages to nock 15.0.5 for maintainers, so the recurring dependabot bumps stop failing CI. It replaces #2802, #2799, and #2800.replycallback as the old callback style and waits for a callback that never runs, which is what stalled theweb-apitests. Reply callbacks now take no arguments, or the newRequestargument when they check the request body.delay()only delays the response body. The concurrency tests now hold the response headers with an asyncreply, because headers arriving is what frees a slot in the client's request queue.Testing
npm testinpackages/web-api(153 passed) andpackages/webhook(39 passed) on Node 26.4.0 with nock 15.0.5.src/WebClient.test.tshung with "Promise resolution is still pending but the event loop has already resolved", the same failure as chore(deps-dev): bump nock from 14.0.17 to 15.0.1 #2782 and chore(deps-dev): bump nock from 14.0.17 to 15.0.3 #2795.Requirements