Chronos
The Deterministic Simulation Testing framework for Node.js & TypeScript. Find 1-in-a-million race conditions in concurrent and distributed systems, then replay them bit-for-bit from a single integer seed.
Overview
Heisenbugs vanish the moment you attach a debugger — so Chronos removes the debugger from the equation. Inspired by FoundationDB and TigerBeetle, it replaces real time, real networking, and real randomness with a fully simulated environment controlled by one integer. The same seed always produces the same interleaving, which means a failure that took 2,000 runs to appear can be replayed exactly, forever.
It ships with a simulated network (message drops, duplicates, partitions, node crashes), a Vitest-native API
that drops straight into existing suites, and a time-travel Inspector — a web UI where you can
scrub through timeline events, inspect message state, step through logs, and generate sequence diagrams.
A CLI (npx chronos replay | trace | open) turns any saved failure seed into a reproduction or a
visual debugging session.
The reference implementation, raft-lite, runs a complete Raft consensus algorithm under intense chaos across 2,000 simulated seeds, checking safety invariants after every run — with CI enforcing the determinism guarantee itself on every push.