Open source · Quality & Testing

Property Test Case Generator

Generate property cases from invariants, boundaries and failure classes.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

property-test-case-generator evaluates a bounded, seeded sequence of integers against a tiny declarative invariant language. It reports the first violated invariant and a deterministic reduced counterexample. It never imports, evaluates, or executes supplied source code. Node.js 22+; zero dependencies.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.

Run the checked-in example

node bin/property-test-case-generator.mjs --root examples --input passing.json
node bin/property-test-case-generator.mjs --root examples --input failing.json
npm run check

Read the result

The passing example exits 0; the failing example exits 1 with a property-violated finding and reproducible seed. Invalid CLI configuration exits 2 with empty stdout. Unreadable, invalid, partial, or contradictory exports exit 2 with an incomplete JSON report. Stdout otherwise contains exactly one report. Input realpaths must stay within the real --root.