fast-check

fast-check

@fast-check.dev

🎲 Property-based testing for JavaScript and TypeScript compatible with Vitest, Jest and others · Official website at https://fast-check.dev · Made with ♥️ by @nicolas.dubien.me

228 followers27 following199 posts

📝 The release note for fast-check 4.10.0 is out! In this version: 🔌 Plugin API preview, 🔌 7 built-in plugins, 🗑️ Deprecation notices to help you prepare for v5! More at: fast-check.dev/blog/2026/09...

fast-check.devWhat's new in fast-check 4.10.0? | fast-checkLet's pave the way for the upcoming v5. fast-check 4.10.0 comes with the idea of easing the migration path to v5. As such, it should be seen as an intermediate version easing the move to v5. It introd...
fast-check@fast-check.dev

🚀 New release! Version 4.10.0 is out. 🫣 Get prepared for the upcoming v5.

They sound make it simple for users to come up with their own capabilities. As an example, we have been asked for observability primitives. Plugins have been designed to offer what's needed to cover these needs. They are tailored for extensibility.

🏗️ We are currently thinking and shaping a plugin API to make it easier to extend capabilities of fast-check. We hope it could make it as a minor 🤞 More to come soon...

⏭️ Iterator's methods being native in JavaScript, we will also reduce our bundle size by dropping our homemade version of them

fast-check@fast-check.dev

⏭️ v5 will also be the first ESM-only release of fast-check. PR on its way 🤞 github.com/dubzzz/fast-...

⏭️ In our next major we are gonna make all properties asynchronous. No more questioning about `property` or `asyncProperty` everything will go via `property`.

fast-check@fast-check.dev

⏭️ In our next major release we are planning to move away from default exports for named ones. ```ts // Valid import in v4 // import fc from 'fast-check' // New way, already supported in v4 import * as fc from 'fast-check' ```

In previous majors, there used to be two "opaque" worlds: sync and async one. Each of them came with its own set of configurations. As such there was an `asyncReporter`, an `asyncBeforeEach`... It won't be the case anymore starting at v5.0.0.

⏭️ In our next major release we are planning to move away from default exports for named ones. ```ts // Valid import in v4 // import fc from 'fast-check' // New way, already supported in v4 import * as fc from 'fast-check' ```

We are also thinking about offering sub-imports paths. So one could do both: ```ts import {nat} from 'fast-check' ``` Or: ```ts import {nat} from 'fast-check/arbitraries/nat' ``` The latter is still uncertain for the very first 5.x release.

fast-check reposted

`vmThreads` is 30% faster in Vitest 5 for your jsdom tests. It is now a much better alternative to the default forks+jsdom. Vitest 5 also comes with a `vitest doctor` command that will find the best settings for you! As a note, browser mode also becomes ~30% faster, but for different reasons :)

We just released a bunch of performance optimisations to make both `next` and `jump` methods faster, with a zoom on `jump`. It could drastically decrease what was remaining of the performance overhead induced by fast-check when running your property.

fast-check reposted

FYI if you use pnpm and upgraded from Vite 7 -> 8, you might still have esbuild installed but unused. You can purge it out by: 1. Set `autoInstallPeers: false` in `pnpm-workspace.yaml` 2. `pnpm i` 3. Undo no1 4. `pnpm i`

🚀 We just released a fresh way lighter version of pure-rand. Install size for each recent version: • 𝟴.𝟰.𝟬: 62.4 kB 🐇 • 𝟴.𝟯.𝟬: 71.6 kB 🐘 • 𝟴.𝟮.𝟬: 53.6 kB 🐜

fast-check@fast-check.dev

🗜️ We are working on a new release of pure-rand to decrease the bundle impact of our Mersenne Twister jump 🤫 📚 And on fast-check's side we pile a few ideas for a next major that should bring an even faster runtime and more.

So far it comes with a few limitations that we have not overcome yet. The clean up of the first beforeEach is fully handled by vitest, as such you'll see the second beforeEach and it's clean up being executed before the first clean up gets called.

🗜️ We are working on a new release of pure-rand to decrease the bundle impact of our Mersenne Twister jump 🤫 📚 And on fast-check's side we pile a few ideas for a next major that should bring an even faster runtime and more.

fast-check@fast-check.dev

🎲 New release of pure-rand, our internal dependency. With 33% increase in bundle size but for the right cause: we want to provide users with ways to jump on Mersenne Twister generators. It has been a long PR started 6 years ago and that finally made it.

🎲 New release of pure-rand, our internal dependency. With 33% increase in bundle size but for the right cause: we want to provide users with ways to jump on Mersenne Twister generators. It has been a long PR started 6 years ago and that finally made it.

🎲 We are currently making deep changes onto our internal random library called pure-rand. Expects lighter bundle on npm and faster to load at execution time within fast-check

View full thread

To date pure-rand is the fastest random generator library on npm. And it comes with plenty of built-in generators and distributions (to pull data outside of generators)

The next major is currently under active development and should come with several new distributions and maybe a few extra generators. But for generators we will have to carefully benchmark them one by one to keep our high throughput standard

🎲 We are currently making deep changes onto our internal random library called pure-rand. Expects lighter bundle on npm and faster to load at execution time within fast-check

Still wondering if we should go full ESM for it. The library is being used by #Jest so we are not sure we do that given they don't support require(esm)

We are currently trying to solve most of the issues that made the #faker project copy paste the code directly in their source code a few years ago

⚡ We are currently moving our build chain to @rolldown.rs It's a game changer! Our packages are building really fast now. In the past we were using raw Typescript, but it's not an ideal option to bundle a package even if it works pretty well.