MCPcopy Create free account
hub / github.com/Effect-TS/effect / testClockWith

Function testClockWith

packages/effect/src/testing/TestClock.ts:469–471  ·  view source on GitHub ↗
(
  f: (testClock: TestClock) => Effect.Effect<A, E, R>
)

Source from the content-addressed store, hash-verified

467 * @since 2.0.0
468 */
469export const testClockWith = <A, E, R>(
470 f: (testClock: TestClock) => Effect.Effect<A, E, R>
471): Effect.Effect<A, E, R> => Effect.withFiber((fiber) => f(fiber.getRef(Clock.Clock) as TestClock))
472
473/**
474 * Accesses a `TestClock` instance in the context and increments the time

Callers 3

adjustFunction · 0.85
setTimeFunction · 0.85
withLiveFunction · 0.85

Calls 2

getRefMethod · 0.80
fFunction · 0.50

Tested by

no test coverage detected