Skip to content

TestClock

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

A manually driven clock.

advance(by): void;

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

Move forward.

Parameter Type
by Duration

void


iso(): string;

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

Current time as ISO.

string


now(): number;

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

Current time (unix ms) — pass clock.now as a now option.

number


set(at): void;

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

Set the time (ISO string or unix ms).

Parameter Type
at string | number

void