填寫這份《一分鐘調查》,幫我們(開發組)做得更好!去填寫Home

HttpClientTestingModule

提供配置 HttpClientTestingBackend 作為 HttpBackend 所使用 HttpClient

Configures HttpClientTestingBackend as the HttpBackend used by HttpClient.

檢視"說明"...

      
      class HttpClientTestingModule {
}
    

說明

注入 HttpTestingController 以期望並重新整理測試中的請求。

Inject HttpTestingController to expect and flush requests in your tests.

提供商

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