HttpClientTestingModule

From Get docs
< @angular/common‎ | http‎ | testingAngular/docs/11/api/common/http/testing/httpclienttestingmodule


HttpClientTestingModule

ngmodule

Configures HttpClientTestingBackend as the HttpBackend used by HttpClient.

See more...

class HttpClientTestingModule {
}

Description

Inject HttpTestingController to expect and flush requests in your tests.

Providers

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


© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v11.angular.io/api/common/http/testing/HttpClientTestingModule