Generate property-based tests with FsCheck or fast-check
Generate property-based tests that verify invariants across random inputs.
dotnet add package FsCheck.Xunit
[Property]
public Property Score_AlwaysBetween0And1(double[] weights)
{
var score = MatchingService.CalculateScore(weights);
return (score >= 0.0 && score <= 1.0).ToProperty();
}
npm install --save-dev fast-check
fc.assert(fc.property(fc.array(fc.double()), (weights) => {
const score = calculateScore(weights);
return score >= 0 && score <= 1;
}));
<target-class>: Class or module to test--framework=<fscheck|fast-check>: Testing frameworkSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer
Tags:testing, property-based, fscheck, quality