This commit handles two cases that were breaking applications when using the new migration:
tests using HttpClientModule in TestBed.configureTestingModule were broken as the import was removed, but the module is still present in the test configuration.
tests using HttpClientTestingModule were migrated to use provideHttpClient(withInterceptorsFromDi()) but the necessary imports were not added.
What is the new behavior?
It now properly adds provideHttpClient(withInterceptorsFromDi()) and related imports to the test for the tests that were using HttpClientModule
It also adds the necessary imports for provideHttpClient and withInterceptorsFromDi for tests that were using HttpClientTestingModule
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
This commit handles two cases that were breaking applications when using the new migration:
HttpClientModule
inTestBed.configureTestingModule
were broken as the import was removed, but the module is still present in the test configuration.HttpClientTestingModule
were migrated to useprovideHttpClient(withInterceptorsFromDi())
but the necessary imports were not added.What is the new behavior?
It now properly adds
provideHttpClient(withInterceptorsFromDi())
and related imports to the test for the tests that were usingHttpClientModule
It also adds the necessary imports forprovideHttpClient
andwithInterceptorsFromDi
for tests that were usingHttpClientTestingModule
Does this PR introduce a breaking change?
Other information