test(replay): add pairFramesStreamed unit tests#20
Merged
Conversation
pairFramesStreamed is exercised only through the HTTP integration tests. Add a dedicated unit suite that covers: single response, multi-frame streaming (progress + result), boundary at the next outbound request, requests with no responses being excluded, and server-pushed notifications (no id) being collected into the response list.
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.
Why
pairFramesStreamedis the function that powers SSE multi-frame replay (v0.4.1). It is only exercised indirectly by the HTTP integration tests intest/http.sse.test.ts, which spin up a real HTTP server and hit it over the network. A dedicated unit suite lets us verify the pairing logic directly against Frame arrays, covering edge cases the integration test does not reach.What
pairFramesStreamedto the import intest/replay.test.tsdescribe("pairFramesStreamed")block with 5 focused tests:id) are included in the response listTests
npm testruns all 14 test files; all 158 tests pass including the 5 new onesSelf-merge gate
Generated by Claude Code