Angular Jasmine - Test case gets failed in http HEAD request while on Flush
问题 I'm trying to write a test case for the HTTP HEAD Request, it works fine without flush method. If I triggered the flush method the chrome browser gets disconnect. I don't know what needs to pass as a param to the flush method. Example: Service Method processData(id): void { const url = `http://localhost:5000/data/${id}`; this.http.head(url).subscribe(() => { console.log('Success'); // Rest of the code - TODO }, (error) => { console.log('Failed'); // Rest of the code - TODO }); } Test Case