angular/goldens/public-api/common/http/testing/index.api.md
Andrew Kushnir ad65f44877 build(common): updating golden files for the @angular/common package (#60623)
This commit updates golden files that got changed after swtiching to relative paths. There are no actual change to the APIs, the golden file updates capture the change in imports.

PR Close #60623
2025-04-01 15:58:51 +00:00

2.6 KiB

API Report File for "@angular/common_http_testing"

Do not edit this file. It is a report generated by API Extractor.


import * as i0 from '@angular/core';
import { Observer } from 'rxjs';
import { Provider } from '@angular/core';

// @public @deprecated
export class HttpClientTestingModule {
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientTestingModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientTestingModule>;
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientTestingModule, never, [typeof HttpClientModule], never>;
}

// @public
export abstract class HttpTestingController {
    abstract expectNone(url: string, description?: string): void;
    abstract expectNone(params: RequestMatch, description?: string): void;
    abstract expectNone(matchFn: (req: HttpRequest<any>) => boolean, description?: string): void;
    abstract expectNone(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): void;
    abstract expectOne(url: string, description?: string): TestRequest;
    abstract expectOne(params: RequestMatch, description?: string): TestRequest;
    abstract expectOne(matchFn: (req: HttpRequest<any>) => boolean, description?: string): TestRequest;
    abstract expectOne(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): TestRequest;
    abstract match(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean)): TestRequest[];
    abstract verify(opts?: {
        ignoreCancelled?: boolean;
    }): void;
}

// @public (undocumented)
export function provideHttpClientTesting(): Provider[];

// @public
export interface RequestMatch {
    // (undocumented)
    method?: string;
    // (undocumented)
    url?: string;
}

// @public
export class TestRequest {
    constructor(request: HttpRequest<any>, observer: Observer<HttpEvent<any>>);
    get cancelled(): boolean;
    // @deprecated
    error(error: ErrorEvent, opts?: TestRequestErrorOptions): void;
    error(error: ProgressEvent, opts?: TestRequestErrorOptions): void;
    event(event: HttpEvent<any>): void;
    flush(body: ArrayBuffer | Blob | boolean | string | number | Object | (boolean | string | number | Object | null)[] | null, opts?: {
        headers?: HttpHeaders | {
            [name: string]: string | string[];
        };
        status?: number;
        statusText?: string;
    }): void;
    // (undocumented)
    request: HttpRequest<any>;
}

// (No @packageDocumentation comment for this package)