Help Angular by taking a 1 minute survey!Go to surveyHome

HttpClientTestingModule

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
      
      HttpClientTestingBackend
    
{ provide: HttpBackend, useExisting: HttpClientTestingBackend }
      
      { provide: HttpBackend, useExisting: HttpClientTestingBackend }
    
{ provide: HttpTestingController, useExisting: HttpClientTestingBackend }
      
      { provide: HttpTestingController, useExisting: HttpClientTestingBackend }