@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

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 }