ci: move public-api goldens to goldens directory (#35768)
Moves the public api .d.ts files from tools/public_api_guard to goldens/public-api. Additionally, provides a README in the goldens directory and a script assist in testing the current state of the repo against the goldens as well as a command for accepting all changes to the goldens in a single command. PR Close #35768
This commit is contained in:

committed by
Matias Niemelä

parent
19cfaf7f4c
commit
15f8afa4bf
43
goldens/public-api/common/http/testing/testing.d.ts
vendored
Normal file
43
goldens/public-api/common/http/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
export declare class HttpClientTestingModule {
|
||||
}
|
||||
|
||||
export declare 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;
|
||||
}
|
||||
|
||||
export declare interface RequestMatch {
|
||||
method?: string;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export declare class TestRequest {
|
||||
get cancelled(): boolean;
|
||||
request: HttpRequest<any>;
|
||||
constructor(request: HttpRequest<any>, observer: Observer<HttpEvent<any>>);
|
||||
error(error: ErrorEvent, opts?: {
|
||||
headers?: HttpHeaders | {
|
||||
[name: string]: string | string[];
|
||||
};
|
||||
status?: number;
|
||||
statusText?: string;
|
||||
}): void;
|
||||
event(event: HttpEvent<any>): void;
|
||||
flush(body: ArrayBuffer | Blob | string | number | Object | (string | number | Object | null)[] | null, opts?: {
|
||||
headers?: HttpHeaders | {
|
||||
[name: string]: string | string[];
|
||||
};
|
||||
status?: number;
|
||||
statusText?: string;
|
||||
}): void;
|
||||
}
|
Reference in New Issue
Block a user