jasmine check if service was called only once code example
Example: jasmine check if service was called only once
expect(yourSpy).toHaveBeenCalledTimes(1);
.toHaveBeenCalledWith("yourArgument")
expect(object.func.calls.count()).toBe(1);
expect(yourSpy).toHaveBeenCalledTimes(1);
.toHaveBeenCalledWith("yourArgument")
expect(object.func.calls.count()).toBe(1);