Freedom251 › Property-Based Testing Tools
fast-check

What fast-check is
fast-check is a free, open-source property-based testing library for JavaScript and TypeScript. It generates inputs, checks specified behavior across many cases, and reduces failures to smaller counterexamples that can help diagnose a problem. Tests use arbitraries to create values, properties to express expected behavior, runners to execute checks, and plugins to extend runners. fast-check works with Jest, Mocha, Vitest, Ava, Bun, Deno, and the Node.js test runner. Users can configure seeds, generated value sizes, time limits, and result reporting globally or per assertion. It supports stateful testing and reproducible failures, and the project describes fuzzing and generative testing for issues such as race conditions and prototype poisoning. The MIT-licensed project also documents an official package for checking specially crafted inputs that might modify global prototypes. Version 5.x requires Node.js 22.12.0 or later and ECMAScript 2025; TypeScript 5.8 or later is optional.
Who it suits
It suits JavaScript and TypeScript developers who want to test behavior across generated inputs, including stateful behavior. Teams using version 5.x should check its listed runtime requirements first.
What it does well
- Free and released under the MIT license
- Works with several test runners
- Shrinks failing inputs to counterexamples
- Supports seeds and reproducible failures
What to know first
- Version 5.x requires Node.js 22.12.0 or later
- Version 5.x requires ECMAScript 2025
Limits
Version 5.x requires Node.js 22.12.0 or later and ECMAScript 2025. TypeScript 5.8 or later is optional.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| fast-check | MIT-licensed JavaScript/TypeScript testing library | Free |
As fast-check.dev lists them, read 30 Sept 2026. The maker's own page has the final word.
Getting started
- Visit the fast-check website.
- Use the library with JavaScript or TypeScript.
- Choose a supported runner such as Jest, Mocha, or Vitest.
- Build tests with arbitraries, properties, runners, and plugins.
- For version 5.x, use Node.js 22.12.0 or later and ECMAScript 2025.
fast-check is a property-based testing library for JavaScript and TypeScript, best suited to developers who want generated-input checks inside an existing test runner. Its free, configurable workflow can make edge cases easier to expose and diagnose, but version 5.x requires a recent runtime.
Overview
Rather than relying only on hand-picked examples, fast-check generates many inputs and checks whether they satisfy properties that describe expected behavior. When a check fails, shrinking reduces the input to a smaller counterexample and provides information to help diagnose the problem. That approach is useful when the range of possible inputs is difficult to anticipate; it is a less natural fit for teams seeking only conventional example-based tests.
Key features
Tests combine arbitraries that generate values, properties that define expected behavior, runners that execute checks, and plugins that extend runners. Because fast-check is test-runner agnostic, it can fit workflows using Jest, Mocha, Vitest, Ava, Bun, Deno or the Node.js test runner without requiring a move to a dedicated runner. Official integrations include AVA, Jest and Vitest, and the ecosystem also includes connectors for Zod and io-ts.
Run settings include seeds, generated-value sizes, time limits and result reporting, configurable globally or per assertion. Seeds make failures reproducible, while shrinking helps turn a difficult-to-understand failure into a more focused case. Stateful testing adds another way to exercise behavior over sequences of actions. The project also describes fuzzing and generative testing for issues such as race conditions and prototype poisoning.
The official @fast-check/poisoning package checks whether specially crafted inputs cause global prototype modifications. That gives security-minded teams a focused option for this class of risk, rather than a general guarantee that an application is secure. fast-check 5.x requires Node.js 22.12.0 or later and ECMAScript 2025; TypeScript 5.8 or later is optional. Those requirements can rule it out in older environments. The project is MIT-licensed and welcomes code and non-code contributions, community help and financial support. Its ecosystem can provide stability and maintenance details for official packages, but does not offer specific guarantees for non-official ones.
Pricing
fast-check — free: the MIT-licensed JavaScript/TypeScript testing library is open source, with no paid plan or free trial. There are no paid tiers to unlock additional capabilities, so it suits teams looking for a free testing library rather than a hosted service. The trade-off is that the project itself does not provide specific stability or maintenance guarantees for non-official ecosystem packages.
Platforms
fast-check supports API, Linux and web platforms, and targets JavaScript and TypeScript. Its version 5.x runtime requirements are important for teams selecting it: the Node.js minimum is 22.12.0, with ECMAScript 2025 required and TypeScript 5.8 or later optional.
Who it's for
Choose fast-check if your team writes JavaScript or TypeScript, wants to explore behavior across generated inputs, and values shrinking and reproducible failures within an existing test runner. It is particularly relevant when edge cases, stateful behavior or specially crafted inputs are concerns. Look elsewhere if your runtime cannot meet the 5.x requirements, or if your team wants to stay with example-based checks alone.
Pros and cons
- Broad runner compatibility: support for common and alternative runners lets teams add property-based checks without replacing their current test framework.
- More actionable failures: shrinking produces smaller counterexamples, and seeds make failures reproducible.
- Flexible runs: configurable seeds, sizes, time limits and reporting can be set globally or per assertion.
- Current runtime floor: Node.js 22.12.0 or later and ECMAScript 2025 for 5.x may exclude older projects.
- Uneven ecosystem assurances: stability and maintenance details are available for official packages, but specific guarantees do not extend to non-official packages.
Alternatives
For other options, browse Property-Based Testing Tools.
- Gopter is a free MIT-licensed Go property-testing library for readers choosing Go rather than JavaScript or TypeScript.
- Scala Hedgehog is a free open-source Scala testing library for teams working in Scala.
- CsCheck is a free Apache 2 option for readers who prefer that licensing and a self-hosted platform.
- QuickCheck is a free Haskell library for random testing of program properties, making it the relevant choice for Haskell projects.
- Rapid is a free open-source Go library with no dependencies outside Go's standard library.
- Hypothesis is a free alternative for readers whose platform needs include Linux, macOS or Windows.
- RapidCheck is another free option for readers targeting Linux, self-hosted or Windows platforms.
- Proptest is a free alternative for readers looking for a web-platform option.
Verdict
fast-check is a strong fit for JavaScript and TypeScript teams that want property-based coverage, reproducible failures and smaller counterexamples without changing test runners. Its free MIT-licensed library is compelling; the main reason to look elsewhere is the version 5.x runtime floor, especially for projects that cannot move to Node.js 22.12.0 or ECMAScript 2025.
Verdict
fast-check offers a configurable property-based testing workflow with failure shrinking and broad test-runner support. Its version 5.x runtime requirements may affect adoption in older environments.
Questions
Is fast-check free?
Yes. It is a free, open-source project released under the MIT license.
Which languages does fast-check support?
It is a property-based testing library for JavaScript and TypeScript.
Which test runners does it work with?
It supports Jest, Mocha, Vitest, AVA, Bun, Deno, and the Node.js test runner.
What does fast-check do when a property fails?
It shrinks the failing input to a smaller counterexample and reports information to help diagnose the failure.
What does version 5.x require?
It requires Node.js 22.12.0 or later and ECMAScript 2025. TypeScript 5.8 or later is optional.
Are all ecosystem packages maintained by the fast-check project?
The ecosystem describes official packages, but says it cannot provide specific stability and maintenance guarantees for non-official packages.
Facts from fast-check's own pages
- Additional testing
- The project describes fuzzing and generative testing for finding issues including race conditions and prototype poisoning. · fast-check.dev, 30 Sept 2026
- API surface
- The API reference documents classes such as Arbitrary, Random, Stream and Value, plus enumerations, interfaces, variables and functions. · fast-check.dev, 15 Oct 2026
- Arbitraries
- Arbitraries generate values and include shrinkers that reduce failures to readable counterexamples. · fast-check.dev, 15 Oct 2026
- Bug discovery
- The project says generated testing can find edge cases, complex input combinations, race conditions, prototype poisoning and zero-days. · fast-check.dev, 15 Oct 2026
- Community activity
- Snyk describes the project as actively maintained, with a README, contributing guide, code of conduct, funding and 80 contributors. · security.snyk.io, 15 Oct 2026
- Compatibility
- Version 4 requires Node.js 12.17.0 or newer, ES2020 support and TypeScript 5.0 or newer when TypeScript is used. · github.com, 15 Oct 2026
- Configuration
- Users can configure runs, seeds, generated value sizes, time limits, and result reporting globally or per assertion. · fast-check.dev, 30 Sept 2026
- Creator
- The Developers' Bakery identifies Nicolas Dubien as fast-check's creator. · thebakery.dev, 15 Oct 2026
- Dependency footprint
- The same index reports one direct dependency, pure-rand, and an unpacked npm size of about 1.5 MB. · javascripts.com, 15 Oct 2026
- Documentation depth
- Documentation includes runnable tutorials, quick start material, reference pages, configuration, advanced topics, migration guides and API reference. · fast-check.dev, 15 Oct 2026
- Ecosystem caveat
- The maintainers state that stability and maintenance are guaranteed for official packages but not for non-official ecosystem packages. · fast-check.dev, 15 Oct 2026
- Ecosystem limitations
- The ecosystem page says it can provide stability and maintenance details for official packages, but no specific guarantees for non-official packages. · fast-check.dev, 30 Sept 2026
- Failure diagnosis
- When a property fails, fast-check shrinks the input to a smaller counterexample and reports information that helps diagnose the failure. · github.com, 30 Sept 2026
- Independent assessment
- DEV.co rates maintenance, documentation, licence clarity, deployment complexity and overall fit positively, with high confidence. · dev.co, 15 Oct 2026
- Integration connectors
- Official connectors are provided for AVA, Jest and Vitest, with additional third-party bridges listed for other tools. · fast-check.dev, 15 Oct 2026
- Integrations
- The ecosystem lists official integrations for AVA, Jest, and Vitest, along with connectors for libraries such as Zod and io-ts. · fast-check.dev, 30 Sept 2026
- Latest notable release
- GitHub's release page lists v4.10.2 with an interrupt-plugin fix and v4.10.0 with a new plugin API, global plugin configuration and timeout plugin. · github.com, 15 Oct 2026
- Licence
- fast-check is released under the MIT licence. · github.com, 15 Oct 2026
- Limit: language scope
- DEV.co notes that fast-check targets JavaScript and TypeScript, so Python, Go, Java and Rust projects need other libraries. · dev.co, 15 Oct 2026
- Limit: learning curve
- DEV.co warns that projects with minimal testing needs may not justify the learning curve and setup overhead of property-based testing. · dev.co, 15 Oct 2026
- Limit: security claims
- DEV.co says fast-check makes no security guarantees and recommends checking generated-input distributions for security-critical fuzzing. · dev.co, 15 Oct 2026
- Maker location
- The creator's GitHub profile lists the location as Remote, France. · github.com, 15 Oct 2026
- Model-based testing
- The API includes modelRun, asyncModelRun and scheduledModelRun functions for model and real-system testing. · fast-check.dev, 15 Oct 2026
- Module formats
- An independent package index reports ESM and CommonJS support with bundled TypeScript declarations. · javascripts.com, 15 Oct 2026
Where fast-check stands on Freedom251
- Property-Based Testing Tools#1 of 28
