Skip to content

test: harden the Node streaming transport and eventsource test suites - #2127

Merged
joker23 merged 1 commit into
mainfrom
skz/sdk-3283/harden-node-server-fetch
Oct 30, 2026
Merged

joker23 merged 1 commit into
mainfrom
skz/sdk-3283/harden-node-server-fetch

Conversation

@joker23

@joker23 joker23 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

This PR will harden node streaming and event source testing. Mainly addressing nits that were deferred from the main PRs.

Additionally, there are some documentation fixes that were also deferred.


Devin Review


Note

Overview
Hardens Node streaming and EventSource test suites and clarifies streaming transport docs—no substantive runtime changes to parseResponseHeaders beyond documentation.

Node NodeRequests streaming tests (client + server): teardown now restores Jest mocks and closes chunk queues so idle streams don’t hang teardown. New coverage asserts reader/body cancel closes the TCP connection, timeout is not applied to streaming fetches (spy on ClientRequest), and (server-node) untrusted TLS via createEventSource surfaces a cert error with no HTTP status.

NodeRequests JSDoc (both packages): documents that streaming ignores the timeout option and that callers may cancel via abort signal or body cancel.

EventSource fetch-injection tests: adds startOutcomeQueue and uses long initialRetryDelayMillis so header-edge-case tests fail fast on errors instead of waiting on reconnect loops.

httpHelpers: expands parseResponseHeaders unit tests (hostile get/forEach, missing headers, throwing getters) and updates unreadable docs to state that throwing header iteration marks headers unreadable even when get succeeds.

Reviewed by Cursor Bugbot for commit 8206877. Bugbot is set up for automated code reviews on this repo. Configure here.

@joker23
joker23 requested a review from a team as a code owner October 27, 2026 20:49
@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 32220 bytes
Compressed size limit: 32500
Uncompressed size: 152548 bytes

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25998 bytes
Compressed size limit: 44000
Uncompressed size: 167978 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 34386 bytes
Compressed size limit: 35000
Uncompressed size: 122562 bytes

@joker23
joker23 merged commit 64e0ed3 into main Oct 30, 2026
69 checks passed
@joker23
joker23 deleted the skz/sdk-3283/harden-node-server-fetch branch October 30, 2026 22:13
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