Context
The sequential Bun corpus frontier is js/third_party/express/express.json.test.ts at position 3962/4708, following the completed router/Supertest work in #219. This contributes to #66.
Current gap
The copied 745-line suite now reaches the in-memory request adapter but requires full request mutation and JSON body-parser semantics: header removal and streamed writes, length/limit enforcement, strict JSON, content-type selection, verification callbacks, charset decoding, compression, and structured middleware errors.
Acceptance criteria
- Supertest supports case-insensitive
set/unset, streamedwrite, byte-preserving bodies, and once-only completion. express.json()handles absent/zero/duplicate bodies and strict JSON parsing without re-reading consumed input.- Numeric/string limits and content-length mismatches produce the correct 413/400 middleware errors.
- Type functions/arrays, verify callbacks, custom status/type, original body, and useful stack context are preserved.
- UTF-8/UTF-16 decoding and identity/gzip/deflate content encodings work, with structured 400/415 errors for malformed or unsupported input.
- The copied suite passes with its existing todos and is pinned in the permanent third-party gate.