In my component I have httpResource: export class EmployeesComponent { employees = httpResource<EmployeeResponseDtoOutput[]>(() => '/api/employees', { defaultValue: [], }); } and in tests I try to test it with Vitest: describe('EmployeesComponent', () => { let component: EmployeesComponent; let fixture: ComponentFixture<EmployeesComponent>; let _httpTesting: HttpTestingController; beforeEach(async () => { await TestBed.configureTestingModule({ imports: [EmployeesComponent], providers: [provideRouter([]), provideHttpClient(), provideHttpClientTesting()], }).compileComponents(); fixture = TestBed.createComponent(EmployeesComponent); component = fixture.componentInstance; _httpTesting = TestBed.inject(HttpTestingController); await fixture.whenStable(); }); it('should create', () => { expect(component).toBeTruthy(); }); it('should fetch employees', () => { const req = _httpTesting.expectOne('/api/employees'); expect(req.request.method).toBe('GET'); req.flush([]); expect(component.employees).toEqual([]); _httpTesting.verify(); }); }); For some reason, HttpTestingController causes tests to never finish. Even should create takes 30 seconds to timeout. When i remove HttpTestingController, should create completes normally. Why is this? Continue reading...