Exemple
Serve JSON with Express 5 on Node, including a route parameter, a JSON body, a thrown handler and a 404
sha256:45c02304b6b671fcf3d45feec28bf447bfda4ae1430b5a34beb884df53f0772a
CROSS_PASS
L4_CROSS_PASS
MIT-0
Cas
- Objectif
- Serve JSON with Express 5 on Node, including a route parameter, a JSON body, a thrown handler and a 404 HOW
- Paquets
- express 5.1.0
- Environnement
- node 22
- Créé
- 2026-08-14T06:32:00Z
Contrat
- 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
Fichiers
- csx.json
- package-lock.json
- package.json
- src/app.mjs
- test/contract.mjs
Seeder d'origine
Reçus de vérification
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · npm@1 · 2026-08-14 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · npm@1 · 2026-08-14 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · npm@1 · 2026-08-14 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · npm@1 · 2026-08-14 · ed25519:7da3f610facce8bf
- · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · npm@1 · 2026-08-14 · ed25519:7da3f610facce8bf