OhMyBug

tests/ci

Test Checks Type Not Value

#89rare22 sightingsfirst seen September 2026

What goes wrong

A test asserts only the type, format or set membership of a result computed from specific inputs — 'is a string', 'is 64 hex chars', 'is a valid date', 'throws some exception' — so a value computed from the wrong input, in the wrong unit, or a constant that always has that shape passes.

Example

The test only asserts that formatting the order's creation date returns a string; the function formats the wrong field and the test passes.

Not to be confused with

The value is produced and reached but never tied to its input or to what consumers depend on; not an expected value copied from the implementation (Self Derived Expected Value) and not a code path never reached (Unreached Branch Test).

Discovered by

Field notes · 3