Skip to content

test(node): e2e tests for expressjs - #61

Merged
dinwwwh merged 1 commit into
mainfrom
claude/expressjs-adapter-tests-23b9a9
Aug 13, 2026
Merged

test(node): e2e tests for expressjs#61
dinwwwh merged 1 commit into
mainfrom
claude/expressjs-adapter-tests-23b9a9

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Aug 13, 2026

Copy link
Copy Markdown
Member

Express.js is now covered by the shared adapter test matrix, so @standardserver/node is verified against a real express app rather than only bare node:http. Two variants run: a plain app, and one with express.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.body short-circuit in the node adapter is now exercised end to end: with express.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.originalUrl handling is also covered for the first time by a real express request.

Compatibility note

express.json() must be registered with strict: 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.

Adds an expressjs client-server harness, with and without express.json()
registered, to the data-transfer and signal-and-cancel suites.
@pullfrog

pullfrog Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Run failed. View the logs →

Pullfrog  | Rerun failed job ➔View workflow run | via Pullfrog | Using DeepSeek Flash (default — pick a model for stronger reviews) | 𝕏

@dinwwwh dinwwwh changed the title test(node): cover express.js in the shared adapter matrix test(node): e2e tests for expressjs Aug 13, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 13, 2026

Copy link
Copy Markdown
@standardserver/aws-lambda

npm i https://pkg.pr.new/@standardserver/aws-lambda@61

@standardserver/bun

npm i https://pkg.pr.new/@standardserver/bun@61

@standardserver/core

npm i https://pkg.pr.new/@standardserver/core@61

@standardserver/deno

npm i https://pkg.pr.new/@standardserver/deno@61

@standardserver/fastify

npm i https://pkg.pr.new/@standardserver/fastify@61

@standardserver/fetch

npm i https://pkg.pr.new/@standardserver/fetch@61

@standardserver/node

npm i https://pkg.pr.new/@standardserver/node@61

@standardserver/peer

npm i https://pkg.pr.new/@standardserver/peer@61

@standardserver/shared

npm i https://pkg.pr.new/@standardserver/shared@61

commit: 0de0282

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 26 untouched benchmarks
⏩ 108 skipped benchmarks1


Comparing claude/expressjs-adapter-tests-23b9a9 (0de0282) with main (100c9a0)

Open in CodSpeed

Footnotes

  1. 108 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@dinwwwh
dinwwwh merged commit 4e017f9 into main Aug 13, 2026
9 of 11 checks passed
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.

1 participant