http2: refactor and split tests of http2.js into multiple files#4561
Merged
http2: refactor and split tests of http2.js into multiple files#4561
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR reorganizes HTTP/2 test files by splitting the large test/http2.js file into smaller, focused test files grouped by functionality. The changes also include minor JSDoc improvements and refactoring in the HTTP/2 client implementation.
- Split the monolithic
test/http2.jsfile into 13 separate test files organized by feature area - Added JSDoc type annotations to the HTTP/2 client implementation
- Minor refactoring to improve code consistency and readability
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/http2.js | Removed entire file content (1887 lines deleted) |
| test/http2-trailers.js | New file containing HTTP/2 trailers handling test |
| test/http2-timeout.js | New file containing HTTP/2 stream timeout test |
| test/http2-stream.js | New file containing HTTP/2 stream error handling test |
| test/http2-pseudo-headers.js | New file containing HTTP/2 pseudo-headers tests |
| test/http2-instantiation.js | New file containing HTTP/2 client instantiation validation tests |
| test/http2-goaway.js | New file containing HTTP/2 GOAWAY frame handling tests |
| test/http2-dispatcher.js | New file containing HTTP/2 dispatcher method tests (stream, pipeline, connect, etc.) |
| test/http2-continue.js | New file containing HTTP/2 continue handling test |
| test/http2-connection.js | New file containing basic HTTP/2 connection tests |
| test/http2-body.js | New file containing HTTP/2 request body handling tests |
| test/http2-alpn.js | Modified existing file with minor cleanup and added completion awaits |
| test/http2-agent.js | New file containing HTTP/2 agent tests |
| test/http2-abort.js | New file containing HTTP/2 request abort tests |
| lib/dispatcher/client-h2.js | Added JSDoc annotations and minor refactoring improvements |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
8b52d1c to
9ee89ae
Compare
Merged
slagiewka
pushed a commit
to slagiewka/undici
that referenced
this pull request
Feb 14, 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.
@metcoder95
Please checkout the change in `onHttp2SessionGoAway`Also dobun test ./test/http2-dispatcher.jsJust proposing changes of the tests, as the changes of client-h2.js will be proposed in another PR.