Skip to content

More TS tools

Beyond the tools with their own pages, a TypeScript team asking “is my stateful, async code correct?” will meet these. None of them explores every order of events; most of them work well next to a tool that does. Download counts are npm monthly downloads in September 2026.

Tools that check something a model checker does not, and fit into the same test suite.

ToolWhat it checksTractionWhere it fits
Fake timers (@sinonjs/fake-timers, behind vi.useFakeTimers and jest.useFakeTimers)Replace timers and Date with a clock the test moves, so async code runs the same way every time249M/moOne order of events per test, picked by its author. In the autosave example, three fake-timer tests pass on the buggy code. A counterexample trace from a model checker can be pinned as a fake-timer test
Effect (with @effect/vitest)Prevents whole classes of async bugs by design: typed errors, scopes, structured concurrency; TestClock and Schema arbitraries in tests120M/moOne order of events per test. In the job lease example, the Effect cancel tests pass on the buggy code, and only a hand-picked slow renewal makes one fail. Layer services make it easy to swap real dependencies for test ones
StrykerMutation testing: whether your tests catch small injected bugs9.1M/moMeasures the strength of any suite, not the orders of events it covers
PactConsumer-driven contracts: request and response pairs between services2.1M/moChecks each interaction at a boundary, not the order of interactions
mswNetwork mocking with scripted responses75M/moControls replies in real code; the test script picks their order
testcontainers (with Toxiproxy)Behavior against real databases and brokers, with injected latency and cuts22M/moReal infrastructure, one order of events per run
Jazzer.jsCoverage-guided fuzzing for crashes and injection bugs67k/moExplores inputs by coverage, not states and orders
zod-fast-checkfast-check generators from zod schemas777k/moGenerated payloads for spec actions

Tools that sound like correctness checking, but check something else.

ToolWhat it checksTractionThe difference
zod, valibot, arktype, typia, io-tsThe shape of data at a boundary, at runtimeAbout 1.1B/mo togetherA schema says what one value may look like; an invariant says what must hold in every state after any sequence of actions
ts-patternExhaustive matching: every case handled, checked at compile time23M/moExhaustive over cases in one place, not over states and orders
tiny-invariantOne condition at one point in one run305M/moAn assertion in the run that happened, not in every run a spec allows

Tools that prove properties of code without running it. They answer “is this function right for every input”, a different question from “can these events happen in an order that breaks something”.

ToolWhat it doesTractionRelation
z3-solverThe official Z3 SMT solver, compiled to WebAssembly, with TypeScript bindings495k/moThe solver most TS verification tools are built on
theoremtsrequires, ensures and invariant written as plain TS calls, proved with Z3, stripped at build time395/mo, 4 starsSpecs as plain TypeScript, applied to single functions instead of state spaces
ts-refinementRefinement types such as Refined<number, "n > 0">, checked by a compiler plugin365/moStronger types; no behavior over time
Flow, ReScriptStricter or sound type systems for JavaScript1.6M/mo, 162k/moType safety, not protocol correctness
ThalesCompiles a strict subset of TypeScript (no mutation, classes or async) to Lean 4 for proofs66 stars, started April 2026Like LemmaScript, proof for pure functions; says nothing about the order of async events
pabst (npm pabst-checker)Properties written as JSDoc @ensures comments on functions, checked by fast-checkNew, July 2026Contracts as comments, sampled; the same author’s Thales is the proof side

LemmaScript has its own page, and Dafny and Lean show proof from a TypeScript project.

ToolWhat it doesStatusRelation
ts-fuzzingGenerators from TS types or zod and valibot schemas, guided fuzzing, and random stateful command sequences2 stars, 13/moRandom stateful testing like fast-check; no exhaustive search
chaosbringerA Playwright crawler that injects network, lifecycle and runtime faults and checks invariants45 stars, 2.6k/moFault injection into a real app, not state exploration
dspecA prototype where a typed formal model is the main spec, with conformance evidence from the code35 stars, not on npmSpec-first: the model is the source of truth and the code is checked against it; an early prototype
@doeixd/machineTypestate machines: a wrong transition is a type errorActive, 168/moPrevents illegal calls; no exploration
jsverify, testcheck-jsEarly QuickCheck ports for JavaScriptUnmaintained since 2018 and 2017, still 150k/mo and 75k/moPredecessors of fast-check

We found no maintained linearizability checker (like Porcupine or Knossos), no maintained LTL runtime monitor, and no maintained session-types library for TypeScript.

Last updated: