Repository navigation
test: harden the Node streaming transport and eventsource test suites - #2127
Merged
Merged
Conversation
Generated-by: termag
Contributor
|
@launchdarkly/js-sdk-common size report |
Contributor
|
@launchdarkly/js-client-sdk-common size report |
Contributor
|
@launchdarkly/js-client-sdk size report |
kinyoklion
approved these changes
Oct 30, 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.
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.
Note
Overview
Hardens Node streaming and EventSource test suites and clarifies streaming transport docs—no substantive runtime changes to
parseResponseHeadersbeyond documentation.Node
NodeRequestsstreaming tests (client + server): teardown now restores Jest mocks and closes chunk queues so idle streams don’t hang teardown. New coverage asserts reader/bodycancelcloses the TCP connection,timeoutis not applied to streaming fetches (spy onClientRequest), and (server-node) untrusted TLS viacreateEventSourcesurfaces a cert error with no HTTP status.NodeRequestsJSDoc (both packages): documents that streaming ignores thetimeoutoption and that callers may cancel via abort signal or bodycancel.EventSource fetch-injection tests: adds
startOutcomeQueueand uses longinitialRetryDelayMillisso header-edge-case tests fail fast on errors instead of waiting on reconnect loops.httpHelpers: expandsparseResponseHeadersunit tests (hostileget/forEach, missing headers, throwing getters) and updatesunreadabledocs to state that throwing header iteration marks headers unreadable even whengetsucceeds.Reviewed by Cursor Bugbot for commit 8206877. Bugbot is set up for automated code reviews on this repo. Configure here.