@universis/common
Version:
Universis - common directives and services
24 lines (23 loc) • 773 B
TypeScript
import { RequestMatch, TestRequest } from '@angular/common/http/testing';
import { HttpRequest } from '@angular/common/http';
export declare class ApiTestingController {
private _match;
private readonly matches;
constructor();
/**
* Prepares a request mapper based on the given request match
* @param match
*/
match(match: RequestMatch): ApiTestingController;
/**
* Maps a request (based on an in-process request match)
* with an instance of TestRequest class
* @param mapper
*/
map(mapper: (request: TestRequest) => void): ApiTestingController;
/**
* Finds a request mapper based on the given request matcj
* @param req
*/
find(req: HttpRequest<any>): (request: TestRequest) => void;
}