test(node): drop Readable.toWeb crash tests now fixed in Node 26.10 - #100
Conversation
Node 26.10 fixed the uncatchable ERR_INVALID_STATE crash when a Readable.toWeb stream is cancelled mid-upload (nodejs/node#62773), so the tests asserting that the bare adapter crashes started failing on Node 26. Remove them and note the upstream fix on toWebReadableStream, which stays until every supported Node release has it.
@standard-server/aws-lambda
@standard-server/core
@standard-server/fastify
@standard-server/fetch
@standard-server/node
@standard-server/peer
@standard-server/shared
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Removed the two canary tests —
utils.test.tsno longer asserts that a bareReadable.toWebcrashes (ERR_INVALID_STATE) on aborted HTTP/1 and HTTP/2 uploads. They were written to fail once Node shipped a fix. - Simplified
runUploadServer— thewrapparameter,stopOnCrashflag, andbare/wrappedhelpers are gone; the helper now always spools viatoWebReadableStream, and thecrashes === []/handled === 25assertions are unchanged. - Updated the doc comment on
toWebReadableStream— records that the crash is fixed upstream in Node 26.10 and when to retire the workaround.
I verified the load-bearing upstream claim: nodejs/node#62773 ("stream: fix ERR_INVALID_STATE when cancelling Readable.toWeb()") merged into main on 2026-09-12 and was cherry-picked into v26.10.0 (Current) via nodejs/node#66163 on 2026-09-22. The premise holds, and keeping toWebReadableStream is still correct since CI also runs Node 20/22/24.
DeepSeek Flash (default — pick a model for stronger reviews) | 𝕏

The Node 26 CI job is green again. Node 26.10 fixed the uncatchable
ERR_INVALID_STATEcrash when aReadable.toWebstream is cancelled mid-upload (nodejs/node#62773). The two tests that expected the plain adapter to crash started failing, so they are removed.toWebReadableStreamkeeps working as before, and its doc comment now says to switch back toReadable.toWebonce every supported Node release has the fix.Fixes
test_node_matrix (26)no longer fails withexpected 0 to be greater than 0on Node 26.10.toWebReadableStreamsurvives aborted HTTP/1 and HTTP/2 uploads are unchanged and still run on every Node version.Context
Testing
packages/node/src/utils.test.tspasses on Node 22.23, 24.21, 26.7 and 26.10.