Trying to validate timeout from db queries, not able to achieve it via HttpTestingController.
Not sure how to design the UT. Where to add the timeout in this setup.
it('test timeout', () => {
service.getData('2025-10-12', '2025-10-16').subscribe(
{
next: data => {
expect(data).not.toBeNull();
},
error: error => {
expect(error).toBeNull(); // handling all missing keys
}
}
);
// mocking endpoint - binding
const response = httpController.expectOne({
method: 'GET',
url: RestServerSA.RELEASES_OVERVIEW_RANGE
});
// mocking response from endpoint
response.flush({});
});
response.flush({})
not sure how to do.