MAIBILAI

toHaveBeenCalled

全部标签

javascript - 试图理解 Jasmine 的 toHaveBeenCalled() 匹配器

我是jasmine的新手,这是我的src文件,我在其中创建了Auth类functionAuth(){}Auth.prototype.isEmpty=function(str){return(!str||0===str.length);}Auth.prototype.Login=function(username,password){if(this.isEmpty(username)||this.isEmpty(password)){return"UsernameorPasswordcann'tbeblank";}else{return"LoggedIn!