1import * as Effect from "effect/Effect";
2import * as Random from "effect/Random";
3import { TestClock } from "effect/testing";
4
5export 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}