The gate's whole decision, as a pure function: which captured entries
survive the allow-list.
Split out of the teardown closure — which only a Playwright runner can
execute — so the decision itself is unit-testable: see
src/tests/unit/tests/e2e-fixture-console-gate.test.ts. (Importing this
module from vitest is fine; base.extend needs no runner at import time.)
Each entry is matched on its OWN text, never on a joined summary: a
pattern must not be able to forgive an unrelated error just because an
allowed one happened to land next to it. kind is carried for the report
only, so a pageerror is judged exactly like a console.error.
The gate's whole decision, as a pure function: which captured entries survive the allow-list.
Split out of the teardown closure — which only a Playwright runner can execute — so the decision itself is unit-testable: see
src/tests/unit/tests/e2e-fixture-console-gate.test.ts. (Importing this module from vitest is fine;base.extendneeds no runner at import time.)Each entry is matched on its OWN
text, never on a joined summary: a pattern must not be able to forgive an unrelated error just because an allowed one happened to land next to it.kindis carried for the report only, so apageerroris judged exactly like aconsole.error.