Configuration
fast-check works out of the box, but everything it does is configurable: the number of runs per property, the seed that makes a failure reproducible, how large generated values can grow, how long a run can take and how results are reported.
There are two levels at which you can set any of these knobs and knowing how they interact is the single most useful thing on this page:
- Per assertion — pass a
Parametersobject as the second argument tofc.assert(property, { ... }). This wins over everything else and applies only to that one call. - Globally — call
fc.configureGlobal({ ... })once, typically in a test setup file, to apply defaults to every assertion in the process.
The per-assertion form always overrides the global one, so a common pattern is to pin conservative defaults globally (e.g. tighter timeouts in CI) and widen them locally for the few tests that need more runs, larger input or a specific seed.
Custom reports
Customize how to report failures.
Global settings
Share settings cross runners.
Larger entries by default
Customize the default "good enough" size for your tests.
Timeouts
Learn about the various timeout options available in the fast-check.
User definable values
Snapshot errors previously encountered and ask for help to reduce cases.