Trying to understand Jasmine's toHaveBeenCalled() matcher
问题 I am new to jasmine here is my src file in which i create Auth class function Auth() { } Auth.prototype.isEmpty = function(str) { return (!str || 0 === str.length); } Auth.prototype.Login = function (username , password) { if (this.isEmpty(username) || this.isEmpty(password)) { return "Username or Password cann't be blank "; } else { return "Logged In !"; } } now i want to test jasmine's toHaveBeenCalled() matcher . Here is what i write it("should be able to Login", function () { spyOn