property-testing

Installation
SKILL.md

Property-based tests

An example test checks the inputs someone thought of. A property test states what must hold for every input, lets the library generate hundreds of inputs it would take a person weeks to think of, and when one breaks the statement, shrinks it to the smallest case that still breaks it: not a list of three hundred elements but [0] with n = 2. That minimal case points at the bug directly.

Property tests complement example tests, they do not replace them. One property test per function that has a clear property; everything else stays example-based. Do not convert existing example tests, do not add properties to glue code. Code with no property gets example tests, and saying so is a valid outcome.

A green property test is not a proof. It says the generator found no counterexample in the runs it made, over the domain you described; it does not say none exists. Its strength is exactly the honesty of the generator. Report it that way: "no counterexample in a hundred runs over inputs of this shape", never "correct for all inputs".

Installs
3
GitHub Stars
4
First Seen
Nov 5, 2026