testing/cross_backend/audit_cross_helpers.ts view source
(fixture: Pick<AuditReadFixture, "reject_unknown_audit_metadata_keys">, metadata: Record<string, unknown> | null, expected: Record<string, unknown>, absent?: readonly string[]): void import {assert_audit_metadata_fields} from '@fuzdev/fuz_app/testing/cross_backend/audit_cross_helpers.js'; Assert an audit row's metadata carries expected — each field compared
on its own, so a consumer's added key passes — and none of absent. When
the fixture's setup closed the world (reject_unknown_audit_metadata_keys),
the whole object must equal expected, so an undeclared key fails too.
fixture
the per-test fixture, whose flag picks the comparison
Pick<AuditReadFixture, "reject_unknown_audit_metadata_keys">metadata
the row's metadata
Record<string, unknown> | nullexpected
the declared fields and their values
Record<string, unknown>absent?
keys the row must not carry, e.g. an optional field left unset
readonly string[][]returns
void