test: add Node.js global fetch regression coverage#5361
Merged
Conversation
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5361 +/- ##
=======================================
Coverage 93.23% 93.24%
=======================================
Files 110 110
Lines 36668 36719 +51
=======================================
+ Hits 34187 34238 +51
Misses 2481 2481 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
trivikr
approved these changes
Jun 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add regression coverage for the Node.js built-in
fetch+ UndiciAgentcombination discussed in #5341.This does not change runtime behavior on
main; it just locks in that response headers remain visible and compressed bodies continue to decode correctly whenfetch()is used with:dispatcher: new Agent()The new test is skipped on Node.js versions before 26, since the specific built-in fetch/dispatcher bridge path under test is the Node 26 behavior.
Testing
npm run lint -- test/node-test/global-dispatcher-version.jsnpx borp -p "test/node-test/global-dispatcher-version.js"source ~/.nvm/nvm.sh && nvm use 26.3.0 >/dev/null && npx borp -p "test/node-test/global-dispatcher-version.js"