CodeVetter · Repo Unpack · Feature catalog
dubzzz/fast-check
Users primarily consume a programmatic API for generative testing and reproducible failure diagnosis. Generator composition, model commands, and promise scheduling support more complex test scenarios. Plugins and framework adapters customize execution and integration. Companion packages and the documentation website provide additional developer-facing capabilities.
- asyncProperty accepts arbitraries and a synchronous or asynchronous predicate; check returns RunDetails, while assert reports failure through a rejected promise by default.
- The public generator catalog includes numbers, strings, dates, functions, collections, recursive structures, JSON, entity graphs, network-shaped strings, identifiers, and typed arrays.
- sample materializes generated values; statistics classifies values into one or more categories, sorts category counts, and emits percentage lines through the configured logger.
- modelRun and asyncModelRun execute commands conditionally against model/real pairs; scheduledModelRun combines commands with a scheduler that also supports promises, functions, sequences, waiting, and task reports.
- Execution options include seed, randomType, numRuns, examples, replay path, skip tolerance, verbosity, and endOnFailure; public plugins add lifecycle hooks, unbiased generation, equal-value handling, interruption, and predicate timeouts.
- Vitest .prop supports tuple or record arbitraries and forwards test modifiers; ordinary wrapped Vitest tests receive context.g. Jest exposes enriched test/it, and AVA testProp exposes only, failing, skip, serial, before, and after.
- Worker properties select file/property/predicate isolation and main-thread/worker generation; poisoning utilities detect or restore global changes, and packaged utilities list published files or remove nonpublished content.
- The documentation surface offers Quick Start, tutorials, API reference, blog, search, and support navigation; the homepage leads to a Vitest tutorial scaffold containing sort.mjs and sort.test.mjs.