Jasmine Periksa apakah layanan hanya dipanggil sekali

 expect(yourSpy).toHaveBeenCalledTimes(1);

.toHaveBeenCalledWith("yourArgument")

expect(object.func.calls.count()).toBe(1);
Talented Tortoise