-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Integrate fast-check for property-based testing alongside the existing example-based Bun test suite.
Motivation
Property-based testing generates random inputs to find edge cases that hand-written examples miss. Good candidates in Unicorn:
attempt()— verify error wrapping holds for arbitrary thrown values (strings, errors, objects, undefined)- Schema helpers — validate that
snowflakeId,secretString, and config schemas reject/accept arbitrary inputs correctly - Component pattern matching — verify parameterized ID parsing with arbitrary string patterns
- Guard composition — verify guard chains short-circuit correctly with arbitrary pass/fail combinations
Scope
- Install
fast-checkas a dev dependency - Add property-based tests alongside existing tests (not replacing them)
- Start with
attempt()and schema helpers as initial targets - Document pattern in
.claude/testing-reference.md
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels