Agent skill

property-test

Generate property-based tests with FsCheck or fast-check

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/property-test

SKILL.md

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

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results