Skip to content

Introduction ​

This guide covers testing with helix:

  • Installation
  • Entry points
  • Best practices

Helix is Ream's unified testing toolkit (@c9up/helix): a test runner CLI, fluent assertions, container overrides, time-travel, and the plugin contract through which each package ships its own fakes. Apps that follow the convention can drive every cross-module integration test through Helix instead of hand-rolling fixtures per package.

Installation ​

bash
pnpm ream add -D @c9up/helix

Entry points ​

Import pathPurpose
@c9up/helixThe runtime DSL (test, describe, it, expect, vi, lifecycle hooks, configure), the container facade and time.
@c9up/helix/runtimeThe runtime DSL alone.
@c9up/helix/containerThe container facade alone: override, overrideOn, useContainer, spy.
@c9up/helix/timefreeze, travel, travelTo, unfreeze, frozenAt — the clock pinned through vi.setSystemTime.
@c9up/helix/runnerThe programmatic runner a host framework drives from its own config file.

helix itself fakes nothing from the ecosystem: each package ships its fakes and helpers under its own /testing entry, as plugins for configure({ plugins }).

Import pathWhat it gives a test
@c9up/ream/testingTestClient, the fluent HTTP client (below).
@c9up/atlas/testingfactory, useTransaction, truncateAll.
@c9up/rover/testingFakeMail, mailFake.
@c9up/nova/testingFakeNova.
@c9up/bay/testingFakeQueue.
@c9up/relay/testingFakeRelay.
@c9up/archive/testingFakeStorage, driveFake.
@c9up/spectrum/testingFakeLogger.

Best practices ​

  • Use Helix's fluent assertion shape (res.expectJson(...)) instead of raw expect() so failure messages stay legible.
  • Truncate via truncateAll(db) in beforeEach for parallel-safe DB tests.
  • Drive bus / mail / queue / nova assertions through the fakes — never assert against production drivers.
  • Pin poolMax: 1 in the test config for SQLite — its writer serialization model makes pool reads + recent writes race occasionally under fast-fire e2e sequences.