FuncType - v0.45.0
    Preparing search index...

    Interface TestContextType<R>

    TestContext provides a complete test environment with mocked services.

    interface TestContextType<R extends Type> {
        clock: TestClockType;
        context: ContextType<R>;
        run<E extends unknown, A extends unknown>(
            effect: IOType<R, E, A>,
        ): Promise<A>;
        withService<S extends unknown>(
            tag: TagType<S>,
            service: S,
        ): TestContextType<R & S>;
    }

    Type Parameters

    Index

    Properties

    Methods

    Properties

    The TestClock for controlling time

    context: ContextType<R>

    The context containing test services

    Methods

    • Provides the test context to an IO effect and runs it

      Type Parameters

      • E extends unknown
      • A extends unknown

      Parameters

      Returns Promise<A>