finds.dev

leebyron/testcheck-js

Generative testing for JavaScript

View on GitHubHomepage ↗

★ 1,169JavaScriptNOASSERTIONupdated Apr 2023

// the take

A JavaScript port of QuickCheck/test.check: you write properties instead of example-based assertions, and it generates random inputs (with automatic shrinking to a minimal failing case) to try to disprove them. It's a testing utility, not a runner, so you pair it with Mocha, Jest/Jasmine, AVA, or Tape via small adapter packages.

Shrinking actually works well here — when a property fails it narrows the input down to something like `[0, -1]` instead of leaving you with a 47-element random array to debug. The generator combinator API (`gen.then`, `gen.sized`, `gen.nested`, `gen.returnOneOf`) is composable enough to model real data relationships, like generating a string and a substring of it together, which is where most naive property tests fall apart. Ships Flow and TypeScript type definitions in the package itself rather than bolting them on later.

Dead project: last push was April 2023, CI is on Travis (which stopped offering free builds years ago), and there's no evidence of maintenance against modern Node or ESM. The core is actually written in ClojureScript (`src/testcheck.cljs`, `src/macros.clj`) and compiled to JS, so anyone wanting to fix a bug or extend a generator needs to touch a Clojure build pipeline, not just JS — that's a real contribution barrier, not a style nitpick. The framework integrations (ava-check, jasmine-check, mocha-testcheck, tape-check) are thin, separately-versioned packages pinned to old major versions of those runners, so compatibility with current Jest/Vitest/AVA is unverified and likely broken. fast-check has eaten this space: it's actively maintained, has first-class TypeScript, and is the default recommendation now, so adopting this today means inheriting an abandonment risk for no real capability gain.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,169
Forks
40
Language
JavaScript
License
NOASSERTION
Last commit
15 Apr 2023

// nearby

If testcheck-js isn't quite it.

All repos →