Skip to content

test(readable): port setEncoding consume matrix - #73

Merged
ronag merged 2 commits into
nxtedition:masterfrom
ronag:codex/test-readable-set-encoding-20260829
Aug 30, 2026
Merged

test(readable): port setEncoding consume matrix#73
ronag merged 2 commits into
nxtedition:masterfrom
ronag:codex/test-readable-set-encoding-20260829

Conversation

@ronag

@ronag ronag commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

The current lower-fork runtime already passes these cases, so this is intentionally a test-only PR.

Validation

Draft pending the full exact-head matrix and fresh Copilot review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds regression coverage around Readable/body-mixin consumption behavior when setEncoding() is applied before and during chunk arrival, specifically targeting multi-byte UTF-8 boundary cases and ensuring later .text()/.json()/etc consumption includes all buffered chunks.

Changes:

  • Added new Readable unit tests covering setEncoding() interactions across chunk boundaries (including partial UTF-8 decoder state) and verifying correctness across bytes(), arrayBuffer(), blob(), text(), and json().
  • Added a Client integration regression test (nodejs#5611) to ensure setEncoding('utf8') followed by deferred .text() consumption preserves a multi-chunk response body.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/readable.js Adds regression tests for Readable body-mixin consumption with setEncoding() across chunk boundaries and multiple consumption methods.
test/client-request.js Adds an integration regression test ensuring Client response bodies remain intact when setEncoding() is set before delayed .text() consumption.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

…-set-encoding-20260829

* origin/master:
  fix(connect): preserve DNS origin hostname on sockets

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@ronag
ronag marked this pull request as ready for review August 30, 2026 06:20
@ronag
ronag merged commit 8d69284 into nxtedition:master Aug 30, 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.

2 participants