testing/adversarial_404.ts

Adversarial 404 testing for routes with params and declared 404 error schemas.

Creates stub handlers that return 404 with the declared error code, fires requests with valid-format-but-nonexistent params (nil UUIDs), and validates response bodies against the declared 404 Zod schemas.

No DB needed — tests schema conformance of 404 responses, not real handlers.

Declarations
#

view source

describe_adversarial_404
#

testing/adversarial_404.ts view source

(options: AdversarialTestOptions): void

Generate adversarial 404 response validation tests.

For each route with params + 404 in error_schemas: 1. Creates a stub handler returning 404 with the declared error code 2. Fires a request with valid-format params (nil UUIDs for UUID params) 3. Validates response status is 404 4. Validates response body matches the declared 404 Zod schema

options

the test configuration

returns

void

Depends on
#

Imported by
#