Ultimate

X_TEST_OPENAPI_EXPECTED

Means

a matcher expected an OpenAPI document and got something else

Typical cause

toMatchOpenApi answered pass:false for a receiver that is not an OpenAPI document, so .not.toMatchOpenApi passed on anything at all

Fix

expect(await app.openapi()).toMatchOpenApi(committed) — the receiver is the generated document: an object with operations: [{ operationId, required? }]

Listed under Testing

This page as markdown