Test Assertion
Noun · Development
Definitions
A statement within a test that declares an expected condition — such as assertEquals(actual, expected) or expect(result).toBe(true) — which either passes silently or fails the test with a diagnostic message when the condition does not hold.
In plain English: A check inside a test that says 'this value should equal that value' and fails the test if it does not.
Example: "The test has 15 assertions but only the last one checks the return value — the rest validate intermediate state, which makes failures hard to diagnose."