testing/adversarial_headers.ts view source
AdversarialHeaderCase import type {AdversarialHeaderCase} from '@fuzdev/fuz_app/testing/adversarial_headers.js'; A header-level attack case for middleware stack testing.
name
type string
headers
type Record<string, string>
expected_status
type number
expected_error?
The error definition the JSON body must be — its code, and a body its schema accepts.
type RestErrorDef<number, string, SchemaEntries>
validate_expectation
Whether the request should reach token validation or be short-circuited by earlier middleware.
type "called" | "not_called"