Skip to content

test: add Node.js global fetch regression coverage#5361

Merged
mcollina merged 1 commit into
mainfrom
test/5341-global-fetch-regression
Jun 6, 2026
Merged

test: add Node.js global fetch regression coverage#5361
mcollina merged 1 commit into
mainfrom
test/5341-global-fetch-regression

Conversation

@mcollina
Copy link
Copy Markdown
Member

@mcollina mcollina commented Jun 5, 2026

Description

Add regression coverage for the Node.js built-in fetch + Undici Agent combination 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 when fetch() is used with:

  • the default global dispatcher
  • an explicit 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.js
  • npx 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"

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.24%. Comparing base (9b1d58f) to head (430ba5d).
⚠️ Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina mcollina requested a review from trivikr June 5, 2026 19:44
@mcollina mcollina merged commit c282546 into main Jun 6, 2026
38 checks passed
@mcollina mcollina deleted the test/5341-global-fetch-regression branch June 6, 2026 12:53
@github-actions github-actions Bot mentioned this pull request Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants