# Property Test

> Generate property-based tests with FsCheck or fast-check

- Skill: `majiayu000/property-test` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/property-test`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/property-test/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/property-test

---


# Property-Based Testing

Generate property-based tests that verify invariants across random inputs.

## For .NET (FsCheck)
```bash
dotnet add package FsCheck.Xunit
```
```csharp
[Property]
public Property Score_AlwaysBetween0And1(double[] weights)
{
    var score = MatchingService.CalculateScore(weights);
    return (score >= 0.0 && score <= 1.0).ToProperty();
}
```

## For TypeScript (fast-check)
```bash
npm install --save-dev fast-check
```
```typescript
fc.assert(fc.property(fc.array(fc.double()), (weights) => {
  const score = calculateScore(weights);
  return score >= 0 && score <= 1;
}));
```

## Arguments
- `<target-class>`: Class or module to test
- `--framework=<fscheck|fast-check>`: Testing framework
