The best way to control Claude Code, Codex and more from any computer or phone

main
ts 13 lines 397 Bytes
Raw
1 import * as Effect from "effect/Effect";
2 import * as Random from "effect/Random";
3 import { TestClock } from "effect/testing";
4
5 export function provideDeterministicTestRuntime<A, E, R>(
6 effect: Effect.Effect<A, E, R>,
7 options: { readonly randomSeed?: number } = {},
8 ) {
9 return effect.pipe(
10 Effect.provide(TestClock.layer()),
11 Random.withSeed(options.randomSeed ?? 0x1234_5678),
12 );
13 }