EVERYTHING XIAOMI
Get listed
fast-check logo

fast-check

fast-check is a property-based testing library for JavaScript and TypeScript.

Place
#1 of 28
Score
7.1
fast-check's website

What fast-check is

fast-check is a property-based testing library for JavaScript and TypeScript. It generates many inputs, checks specified behavior, and reduces failures to smaller counterexamples that can help pinpoint a problem. Tests are built from arbitraries that create values, properties that express expected behavior, runners that execute checks, and plugins that extend runners. It works with multiple test runners, including Jest, Mocha, Vitest, Ava, Bun, Deno, and the Node.js test runner. You can set seeds, generated value sizes, time limits, and reporting options globally or for an individual assertion. The library also supports stateful testing and reproducible failures, and its project describes fuzzing and generative testing for finding issues such as race conditions and prototype poisoning. It is free and open source under the MIT license. Version 5.x requires Node.js 22.12.0 or later and ECMAScript 2025; TypeScript 5.8 or later is optional.

Good

  • Shrinks failing inputs into smaller counterexamples.
  • Works with several popular test runners.
  • Supports stateful testing and reproducible failures.
  • Runs can be configured with seeds and time limits.
  • Free under the MIT license.

Watch out

  • Version 5.x requires Node.js 22.12.0 or later.
  • Version 5.x requires ECMAScript 2025.
  • TypeScript 5.8 or later is optional, not required.

Who it suits

It suits JavaScript and TypeScript developers who want to check behavior across generated inputs, including stateful scenarios. Its runner-agnostic design can fit projects using a range of test runners.

Verdict

fast-check provides a structured way to exercise JavaScript and TypeScript behavior across generated cases, with shrinking to help investigate failures. Check the version 5.x runtime requirements before adopting it.

Plans and prices

From fast-check's own pricing page, checked 30 Sep 2026.

All about pricing
PlanPriceWhat it gives you
fast-checkFreeMIT-licensed JavaScript/TypeScript testing library

The facts

Each one read from fast-check's own pages, with the date it was checked.

What it does

Additional testing
The project describes fuzzing and generative testing for finding issues including race conditions and prototype poisoning.checked 30 Sep 2026
API surface
The API reference documents classes such as Arbitrary, Random, Stream and Value, plus enumerations, interfaces, variables and functions.checked 15 Oct 2026
Arbitraries
Arbitraries generate values and include shrinkers that reduce failures to readable counterexamples.checked 15 Oct 2026
Bug discovery
The project says generated testing can find edge cases, complex input combinations, race conditions, prototype poisoning and zero-days.checked 15 Oct 2026
Community activity
Snyk describes the project as actively maintained, with a README, contributing guide, code of conduct, funding and 80 contributors.checked 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.checked 15 Oct 2026
Configuration
Users can configure runs, seeds, generated value sizes, time limits, and result reporting globally or per assertion.checked 30 Sep 2026
Creator
The Developers' Bakery identifies Nicolas Dubien as fast-check's creator.checked 15 Oct 2026
Dependency footprint
The same index reports one direct dependency, pure-rand, and an unpacked npm size of about 1.5 MB.checked 15 Oct 2026
Documentation depth
Documentation includes runnable tutorials, quick start material, reference pages, configuration, advanced topics, migration guides and API reference.checked 15 Oct 2026
Ecosystem caveat
The maintainers state that stability and maintenance are guaranteed for official packages but not for non-official ecosystem packages.checked 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.checked 30 Sep 2026
Failure diagnosis
When a property fails, fast-check shrinks the input to a smaller counterexample and reports information that helps diagnose the failure.checked 30 Sep 2026
Independent assessment
DEV.co rates maintenance, documentation, licence clarity, deployment complexity and overall fit positively, with high confidence.checked 15 Oct 2026
Integration connectors
Official connectors are provided for AVA, Jest and Vitest, with additional third-party bridges listed for other tools.checked 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.checked 30 Sep 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.checked 15 Oct 2026
Licence
fast-check is released under the MIT licence.checked 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.checked 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.checked 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.checked 15 Oct 2026
Model-based testing
The API includes modelRun, asyncModelRun and scheduledModelRun functions for model and real-system testing.checked 15 Oct 2026
Module formats
An independent package index reports ESM and CommonJS support with bundled TypeScript declarations.checked 15 Oct 2026

The company

Maker location
The creator's GitHub profile lists the location as Remote, France.checked 15 Oct 2026
The full review of fast-check

fast-check is a free property-based testing library for JavaScript and TypeScript. It is best suited to developers who want generated-input checks within an existing test runner; version 5.x’s runtime requirements may rule it out for older environments.

Overview

Instead of relying only on hand-picked examples, fast-check generates inputs and evaluates properties that express expected behavior. When a property fails, it shrinks the failing input to a smaller counterexample and reports information to help diagnose it. That makes it useful for probing behavior across cases a developer may not think to write individually. It is a complement to conventional example-based tests, not necessarily a replacement for them.

Key features

Tests combine arbitraries that generate values, properties that specify expected behavior, runners that execute those properties, and plugins that extend runners. fast-check is test-runner agnostic and supports workflows with Jest, Mocha, Vitest, Ava, Bun, Deno, and the Node.js test runner. Official integrations include AVA, Jest, and Vitest; connectors for Zod and io-ts extend its reach to those libraries.

Runs can be configured globally or per assertion, including seeds, generated-value sizes, time limits, and result reporting. Seeds allow a failure to be reproduced, while shrinking makes the counterexample more focused. Stateful testing is also supported. These controls are useful for tuning generated checks, though teams need to decide how those checks fit alongside their existing tests.

The project also describes fuzzing and generative testing for issues such as race conditions and prototype poisoning. Its official @fast-check/poisoning package checks whether specially crafted inputs cause global prototype modifications. This is a targeted security-testing aid rather than a claim that the library covers every security concern.

For version 5.x, fast-check requires Node.js 22.12.0 or later and ECMAScript 2025; TypeScript 5.8 or later is optional. That is a meaningful adoption constraint for projects that cannot move to those runtime requirements.

Pricing

fast-check is open source under the MIT license, with a free plan at no cost. There is no free trial because no paid plan is required. The project welcomes code and non-code contributions, community help, and financial support through GitHub Sponsors or OpenCollective. Its free price is compelling for teams comfortable using a community-maintained library; there is no paid tier described for buyers seeking a commercial support plan.

Platforms

fast-check is available for API, Linux, and web environments. It supports JavaScript and TypeScript, with test-runner support spanning Jest, Mocha, Vitest, Ava, Bun, Deno, and the Node.js test runner.

Who it's for

Choose fast-check if you write JavaScript or TypeScript and want to explore behavior across generated cases without changing test runners. It is particularly relevant when hard-to-anticipate inputs, reproducible failures, or stateful behavior matter. Teams on older Node.js versions should check compatibility before adopting 5.x.

Pros and cons

  • Pro: Shrinking turns a failing generated input into a smaller counterexample, helping focus debugging.
  • Pro: Configurable seeds, sizes, time limits, and reporting give teams control over runs, including per-assertion settings.
  • Pro: Runner agnosticism and integrations for common JavaScript test runners make it possible to add generated checks to an existing workflow.
  • Pro: The MIT-licensed library is free, and the ecosystem includes a specific package for checking prototype-poisoning behavior.
  • Con: Version 5.x requires Node.js 22.12.0 or later and ECMAScript 2025, which can block use in older environments.
  • Con: Property-based testing requires expressing expected behavior as properties, a different approach from writing only individual examples.
  • Con: The ecosystem describes stability and maintenance details for official packages, but makes no specific guarantees for non-official packages.

Alternatives

For Go, Gopter is a free MIT-licensed property-testing package for Linux and self-hosted use. Rapid is another free, open-source Go library and has no dependencies outside the Go standard library. Pick either instead when Go is the language you need to test.

Scala Hedgehog is a free open-source Scala testing library for Linux, making it the language-specific option for Scala projects. CsCheck is free forever under Apache 2 and is self-hosted; it is an alternative when that license and deployment model suit your needs. QuickCheck is a free Haskell library for random testing of program properties, so Haskell teams should consider it instead.

Hypothesis is a free alternative for Linux, macOS, and Windows. RapidCheck is free and supports Linux, self-hosted, and Windows environments. Proptest is a free alternative available on the web.

Browse Property-Based Testing Tools for more options.

Verdict

JavaScript and TypeScript developers who want configurable generated-input tests, reproducible failures, and smaller counterexamples should choose fast-check, especially if they can use an existing supported runner. Its strongest reason to adopt is that it brings those checks into familiar test workflows at no cost. Look elsewhere if version 5.x’s runtime requirements do not fit your project or you need a language-specific alternative.

Alternatives to fast-check

All alternatives
  1. 1

    ScalaCheck

    Free planLinuxmacOSWindows
    6.6Free plan
  2. 2

    Gopter

    Free planLinuxSelf-hosted
    6.4Free plan
  3. 3

    JSVerify

    Free planWebSelf-hosted
    6.4Free plan
  4. 4

    Racket QuickCheck

    Free planLinuxmacOSWindows
    6.4Free plan
  5. 5

    FsCheck

    Free planLinuxmacOSWindows
    6.3Free plan
  6. 6

    QCheck

    Free planLinux
    6.0Free plan