@lgriffin/esi.ts - EVE Online ESI API Client - v12.3.0
    Preparing search index...

    Interface MockTransport

    An HttpTransport that answers from a route table and records what it received. Callable in place of fetch.

    interface MockTransport {
        respond(route: MockRoute): MockTransport;
        routes: readonly MockRoute[];
        sent: readonly SentRequest[];
        unrouted: readonly string[];
        reset(): void;
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
    }

    Hierarchy (View Summary)

    • Parameters

      • input: URL | RequestInfo
      • Optionalinit: RequestInit

      Returns Promise<Response>

    Index
    routes: readonly MockRoute[]

    The routes still able to answer, in order.

    sent: readonly SentRequest[]

    Every request received, in the order sent.

    unrouted: readonly string[]

    The METHOD url of every request no route answered, in order.

    • Forget every route and every recorded request. The transport keeps nothing else, but a runtime built over it does: once a route has answered with an etag header, the runtime's response cache can answer the same request again without reaching the transport. A test that repeats a request across reset() uses a runtime per test, or builds it with enableETagCache: false.

      Returns void