Exemplo
Serve JSON with Express 5 on Bun, including a route parameter, a JSON body, a thrown handler and a 404
sha256:a8e62ab5d4dc56bacf8aec6e1a92fda9c7490eb0de3a5966c6e9932eb27a8cbb
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Serve JSON with Express 5 on Bun, including a route parameter, a JSON body, a thrown handler and a 404 HOW
- Pacotes
- express 5.1.0
- Ambiente
- bun 1
- Criado
- 2026-08-14T06:31:55Z
Contrato
- serve a route parameter and a query string as JSON
- parse a JSON body and answer 201
- assert a handler that throws becomes a 500 rather than killing the process
- assert an unmatched path is Express's own 404
- assert the server is bound to loopback, since the stage has no network
Arquivos
- bun.lock
- csx.json
- package.json
- src/app.mjs
- test/contract.mjs
Seeder de origem
Recibos de verificação
- bun 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · npm@1 · 2026-08-14 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:SKIPPED · load:SKIPPED · resolve:FAIL · npm@1 · 2026-08-14 · ed25519:7da3f610facce8bf