Setu-TS
    Preparing search index...

    Interface TestContextOptions

    Options for createTestContext.

    0.1.0

    interface TestContextOptions {
        body?: unknown;
        params?: Record<string, string>;
        query?: Record<string, string>;
        request?: Partial<IRequest>;
        response?: IResponse;
        runtime?: IRuntimeServices;
        services?: IServiceRegistry;
        signal?: AbortSignal;
        startTime?: number;
        state?: Map<string, unknown>;
    }
    Index
    body?: unknown

    Body backing json()/text()/bytes() on the mock request.

    params?: Record<string, string>

    Path parameters — defaults to {}.

    query?: Record<string, string>

    Query string parameters — defaults to parse from the request URL's search params.

    request?: Partial<IRequest>

    Partial IRequest overrides (method, url, headers, etc.).

    response?: IResponse

    Response builder — defaults to new MockResponse().

    Runtime services — when absent, the internal default is used.

    services?: IServiceRegistry

    Service registry — defaults to new MockServiceRegistry().

    Typed as the IServiceRegistry interface (not the concrete MockServiceRegistry) so a test may pass any implementation — a custom fake, or a real kernel registry taken from a started app — matching IRequestContext.services.

    signal?: AbortSignal

    Abort signal for ctx.signal. Precedence is options.request.signal > options.signal > a live, never-aborting AbortController().signal — request.signal wins because that is the kernel's own rule (request.signal ?? NEVER_ABORT_CONTROLLER.signal).

    startTime?: number

    Direct startTime override — highest precedence: options.startTime ?? options.runtime?.hrtime() ?? 0. Must be a monotonic reading, never Date.now().

    state?: Map<string, unknown>

    Request-scoped state — defaults to new Map().