PRO

TigerBeetle Test Ledger

An in-memory TigerBeetle that enforces the real rejection semantics, so ledger code is unit tested in CI without a cluster. It implements createAccounts, createTransfers, lookupAccounts and lookupTransfers against the actual 0.17.x result shape (one { timestamp, status } per event, positionally, with created = 4294967295), plus double entry, the debits_must_not_exceed_credits invariant, two-phase pending/post/void with field inheritance, linked-chain rollback with linked_event_failed and linked_event_chain_open, id idempotency, and id_already_failed. Prevents the hand-rolled mock that resolves to an empty array, which trains code to never read a status and silently ignores every rejection until production, and it exposes advanceSeconds so pending-timeout expiry is an assertion instead of a sleep. Pinned to tigerbeetle-node 0.17.9.

Install
npx shadcn@latest add https://ui.aryank.space/r/tigerbeetle-test-ledger.json

Installs from ui.aryank.space. To add it by hand, copy the files in Files below, or register the @compronents namespace via the docs.

Visualization
test double
unit test
unknown
status handling
unknown
production
unknown
createTransfers: async () => [] // every test is green

The mock resolves to an empty array, so the code under test never reads a status and every assertion is green. The first real rejection arrives in production: the customer overdraws, exceeds_credits comes back, and the handler that was never written to read it books the order anyway.

Files

Dependencies