/** * Manual-flush HTTP testing controller. * * Mirrors Angular's `HttpTestingController`: install registers a low-level * interceptor that captures every request (fetch / XHR / `http.ClientRequest`); * tests claim a request via `expectOne(matcher)` and resolve it via `flush()` * or `error()` whenever the assertion sequence requires. * * Uses `@mswjs/interceptors` so axios's pre-captured `fetch` reference (and * the XHR adapter that jsdom selects by default) are both intercepted at the * network primitive level — no need to swap adapters per test. */ export type HttpMatcher = string | RegExp | ((request: Request) => boolean); export interface HttpExpectation { request: Request; url: string; method: string; flush(body: unknown, init?: ResponseInit): void; error(status: number, body?: unknown): void; } export interface HttpController { expectOne(matcher: HttpMatcher): HttpExpectation; match(matcher: HttpMatcher): HttpExpectation[]; pending(): ReadonlyArray<{ method: string; url: string; }>; verify(): void; reset(): void; uninstall(): void; } export declare function installHttpController(): HttpController; //# sourceMappingURL=http-controller.d.ts.map