test(node): e2e tests for expressjs - #61
Merged
Merged
Conversation
Adds an expressjs client-server harness, with and without express.json() registered, to the data-transfer and signal-and-cancel suites.
Contributor
|
Run failed. View the logs →
|
@standardserver/aws-lambda
@standardserver/bun
@standardserver/core
@standardserver/deno
@standardserver/fastify
@standardserver/fetch
@standardserver/node
@standardserver/peer
@standardserver/shared
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
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.

Express.js is now covered by the shared adapter test matrix, so
@standardserver/nodeis verified against a real express app rather than only barenode:http. Two variants run: a plain app, and one withexpress.json()registered the way an ordinary project does.Coverage
Both variants run the full data-transfer and signal-and-cancel suites — url/method/header/status round-trips, every body kind (json, blob, file, form-data, event-stream, octet-stream), parallel-chunk streaming timing, abort signals, and stream cancellation.
The
req.bodyshort-circuit in the node adapter is now exercised end to end: withexpress.json()in front, JSON bodies arrive pre-parsed and every other content type still reaches the adapter as an untouched stream. Streaming, abort, and cancellation behave identically with and without the parser.req.originalUrlhandling is also covered for the first time by a real express request.Compatibility note
express.json()must be registered withstrict: false. Its default rejects any top-level JSON value that isn't an object or array —"a string",null,1— with a 400 before the adapter ever runs, and those are valid standard-server bodies. The test harness documents this inline.Testing
966 tests pass. Lint and type check are clean.