OhMyBug

tests/ci

Assertion Cannot Fail

#81rare8 sightingsfirst seen August 2026

What goes wrong

An assertion uses a matcher or signature that accepts anything — a pattern matching every string, 'not null' on a value that cannot be null — or verifies a call on an overload production no longer uses, so it can never fail.

Example

The test asserts the message matches a pattern that accepts any text, so any message, including an empty one, passes.

Not to be confused with

Passes on any value at all, unlike an assertion that passes only because its branch was never reached (Unreached Branch Test) or one satisfied by something else on the page (Assertion Satisfied Elsewhere).

Discovered by

Field notes · 2