HttpClientTestingModule

Configures HttpClientTestingBackend as the HttpBackend used by HttpClient.

See more...

class HttpClientTestingModule { }

说明

Inject HttpTestingController to expect and flush requests in your tests.

Providers

Provider
HttpClientTestingBackend
{ provide: HttpBackend, useExisting: HttpClientTestingBackend }
{ provide: HttpTestingController, useExisting: HttpClientTestingBackend }