Tests are executable claims
Write checks around behavior that matters.
16 minutes
Start with an invariant
A test expresses a claim: an unassigned filter excludes assigned sessions, or one learner cannot read another’s records. Use a small synthetic example with an independently understandable expected result.
Match the test to the risk
A pure function is cheap to check with a unit test. Ownership requires an API or database authorization test. A keyboard journey needs an interface check. Many superficial tests do not replace one check at the failing boundary.