HttpClientTestingModule

Configures HttpClientTestingBackend as the HttpBackend used by HttpClient.

查看"说明"...

      
      class HttpClientTestingModule {
}
    

说明

Inject HttpTestingController to expect and flush requests in your tests.

提供商

提供商
HttpClientTestingBackend
      
      HttpClientTestingBackend
    
{ provide: HttpBackend, useExisting: HttpClientTestingBackend }
      
      { provide: HttpBackend, useExisting: HttpClientTestingBackend }
    
{ provide: HttpTestingController, useExisting: HttpClientTestingBackend }
      
      { provide: HttpTestingController, useExisting: HttpClientTestingBackend }