Skip to content

createTestClock

function createTestClock(start?): TestClock;

Defined in: src/testing/index.ts:39

Create a TestClock starting at start (default: real now).

Parameter Type
start? string | number

TestClock

const clock = createTestClock("2026-01-01T00:00:00Z");
clock.advance("1h");
clock.iso(); // "2026-01-01T01:00:00.000Z"