Error while running the spec: Error: 1 timer(s) still in the queue. To fix this you have to modify your spec file function and add flush at the end:
Before:
it('#foo shoudl work', fakeAsync(async () => {
// Arrange
// Act
await component.foo();
// Assert
expect(mockedService.myMethod).toHaveBeenCalled();
}));
After:
it('#foo shoudl work', fakeAsync(async () => {
// Arrange
// Act
await component.foo();
// Assert
expect(mockedService.myMethod).toHaveBeenCalled();
flush();
}));
Adding flush() to your method at last will fix the issue.