API suites check more than a status code and a substring. Five releases of @donobu/donobu-http-testing (1.2.0 to 1.7.0) grow what a test can check, and keep sensitive data out of everything Donobu records.
Mark a field as sensitive, and the request on the wire still carries the real value. The test and its checks also see the real value. Records, reports, triage evidence and the model see [redacted].
sensitive()marks a zod field;httpConfig.redacttakes JSONPath rules such as$..ssnexpect.headers,expect.maxDurationMs, per-calltimeoutMsandmaxRedirects- Status as a code, a list, or a range such as
'2xx'or'400-499' textExcludesfor fragments a body must not contain, andjsonPathchecks on selected valuesretryon 429 and 503, honoringRetry-After, with capped backoff- Real JSON Schema validation (draft 2020-12), repeated query keys sent in order, and nullable zod fields accepted
- Checks run against the full response body; only a bounded copy is stored