Vibeleaderboard
← Glossary
Glossary · AI and agent workflows

Behavior check

A small program that gives the real program an input from the specification and compares the result with the expected output.

Behavior checks are derived from behavior examples and named after the behavior they test, so that a failure message says which requirement is broken. The expected value is written down from the specification rather than computed with the program's own expression, so that a mistake in the expression is not copied into the check. A check that only confirms a function returned something passes over wrong results. The course's nine checks for the quote comparison all read the two fixture files through the program's own reader.

See how the idea fits

Make a check fail for the right reason, then pass →
Definition sources