Testing

Testing & Verification

Property tests, proofs, real databases and gates that actually gate

8 guides in this collection

Testing

Property Tests for "Must Never" Rules

Put retention, limits and permission rules in a module with no I/O, then state what must never happen and let a generator hunt for the case that breaks it.

3 min read
Data Testing

Test D1 Code Against Real SQLite

A hand-written database mock agrees with whatever the code expects. Run tests through a thin D1 shim over real SQLite, with the real migrations applied.

3 min read
Testing

A Coverage Gate That Actually Gates

A threshold written in the docs and not in the config protects nothing. Put the floor in the test tool, run that exact command in CI, and delete checks that cannot fail.

3 min read
Testing

Dangerous Tests Must Refuse to Run

A test that types keys, deletes files or writes to a real state file checks where it is first, and stops with a clear message if the place is not disposable.

3 min read
Testing

Strict Command-Line Tools

A command with one bad argument changes nothing and says why. Validate everything before acting, and report a refusal as a refusal, not as silence.

3 min read