@@ -13,12 +13,12 @@ import {HTTP_INTERCEPTORS, HttpInterceptor} from '../src/interceptor';
1313import { HttpRequest } from '../src/request' ;
1414import { HttpEvent , HttpResponse } from '../src/response' ;
1515import { HttpTestingController } from '../testing/src/api' ;
16- import { HttpClientTestingModule } from '../testing/src/module' ;
1716import { TestRequest } from '../testing/src/request' ;
1817import { Injectable , Injector } from '@angular/core' ;
1918import { TestBed } from '@angular/core/testing' ;
2019import { Observable } from 'rxjs' ;
2120import { map } from 'rxjs/operators' ;
21+ import { provideHttpClientTesting } from '../testing/src/provider' ;
2222
2323const IS_INTERCEPTOR_C_ENABLED = new HttpContextToken < boolean | undefined > ( ( ) => undefined ) ;
2424
@@ -80,11 +80,12 @@ describe('HttpClientModule', () => {
8080 let injector : Injector ;
8181 beforeEach ( ( ) => {
8282 TestBed . configureTestingModule ( {
83- imports : [ HttpClientTestingModule ] ,
83+ imports : [ ] ,
8484 providers : [
8585 { provide : HTTP_INTERCEPTORS , useClass : InterceptorA , multi : true } ,
8686 { provide : HTTP_INTERCEPTORS , useClass : InterceptorB , multi : true } ,
8787 { provide : HTTP_INTERCEPTORS , useClass : InterceptorC , multi : true } ,
88+ provideHttpClientTesting ( ) ,
8889 ] ,
8990 } ) ;
9091 injector = TestBed . inject ( Injector ) ;
@@ -134,8 +135,10 @@ describe('HttpClientModule', () => {
134135 it ( 'allows interceptors to inject HttpClient' , ( done ) => {
135136 TestBed . resetTestingModule ( ) ;
136137 TestBed . configureTestingModule ( {
137- imports : [ HttpClientTestingModule ] ,
138- providers : [ { provide : HTTP_INTERCEPTORS , useClass : ReentrantInterceptor , multi : true } ] ,
138+ providers : [
139+ { provide : HTTP_INTERCEPTORS , useClass : ReentrantInterceptor , multi : true } ,
140+ provideHttpClientTesting ( ) ,
141+ ] ,
139142 } ) ;
140143 injector = TestBed . inject ( Injector ) ;
141144 injector
0 commit comments