property-based-testing
Property-based testing with fast-check (TypeScript/JavaScript) and Hypothesis (Python). Generate test cases automatically, find edge cases, and test mathematical properties. Use when user mentions property-based testing, fast-check, Hypothesis, generating test data, QuickCheck-style testing, or finding edge cases automatically.
npx skills add foryourhealth111-pixel/Vibe-Skills --skill property-based-testing --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Provides expert guidance on property-based testing, including how to generate test cases automatically, shrink failing cases to minimal examples, and verify mathematical properties across multiple data types and scenarios. It covers both fast-check (TypeScript/JavaScript) and Hypothesis (Python) implementations, with concrete examples and common properties to test.
How it works
Describes property-based testing concepts: generators, shrinking, and coverage. For TypeScript/JavaScript, shows using fast-check to define properties with fc.property and various built-in generators, plus examples for common properties (roundtrip, idempotence, commutativity, associativity, identity, inverse). Includes configuration options (numRuns, seed, endOnFailure, verbose) and preconditions (fc.pre). For Python, demonstrates Hypothesis with @given and strategies (st.*), custom strategies, and properties analogous to the TypeScript examples. Also covers shrinking behavior demonstrations and stateful testing with Hypothesis. Provides real-world examples in both languages (URL parser, data validation, list operations, cache behavior) and best practices (start with properties, complement empirical tests, shrink promises, and reproducibility via seeds).
When to use it
Use when the user mentions property-based testing, fast-check, Hypothesis, generating test data, QuickCheck-style testing, or finding edge cases automatically. Apply to mathematical operations, encoders/decoders, parsers/serializers, data transformations, API contracts, invariants, and constraints.
What it can touch
Requires tools: claude-code, codex. It instructs to show concrete code examples using fast-check and Hypothesis, including commands and file snippets such as installation commands, test code blocks, and configuration blocks. It references specific functions and file patterns like fc.assert, fc.property, fc.integer, st.integers, @given, and various generator configurations. It uses examples that include TypeScript snippets and Python snippets, with multiple built-in generators and custom strategies.
Caveats
No explicit licensing or risk statements are shown beyond the overall Apache-2.0 license of the skill. The material provides examples and expectations (e.g., shrinking minimizes failing cases, reproducibility via seeds) as described in the content; it does not guarantee outcomes in every context.
# Property-Based Testing Expert knowledge for property-based testing - automatically generating test cases to verify code properties rather than testing specific examples. ## Core Expertise **Property-Based Testing Concept** - **Traditional testing**: Test specific examples - **Property-based testing**: Test properties that should hold for all inputs - **Generators**: Automatically create diverse
What does the property-based-testing skill do?
Property-based testing with fast-check (TypeScript/JavaScript) and Hypothesis (Python). Generate test cases automatically, find edge cases, and test mathematical properties. Use when user mentions property-based testing, fast-check, Hypothesis, generating test data, QuickCheck-style testing, or finding edge cases automatically.
How do I install it?
Run `npx skills add foryourhealth111-pixel/Vibe-Skills --skill property-based-testing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From foryourhealth111-pixel/Vibe-Skills, a repository with 2,593 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.