Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jasmine check if service was called only once

 expect(yourSpy).toHaveBeenCalledTimes(1);

.toHaveBeenCalledWith("yourArgument")

expect(object.func.calls.count()).toBe(1);
 
PREVIOUS NEXT
Tagged: #jasmine #check #service #called
ADD COMMENT
Topic
Name
1+1 =