Is there a way in jasmine
where I can combine toHaveBeenCalledTimes
with toBeGreaterThan
?
I want to know whether the spy object has called a particular method at least 2 times.
spy Object
spyOn(component.videos, 'update').and.callThrough();
I know we can verify it for exact number of times, but in my case update
method can be called any number of times. I want to check if it has been called at least twice
something like below expect statement
expect(component.videos.update).toHaveBeenCalledTimes(2).toBeGreaterThan(2);
I know it is a wrong syntax, but is there anything similar to that?