阅读背景:

使用success()和error()测试控制器

来源:互联网 

I'm trying to work out the best way to unit test success and error callbacks in controllers. I am able to mock out service methods, as long as the controller only uses the default $q functions such as 'then' (see the example below). I'm having an issue when the controller responds to a 'success' or 'error' promise. (Sorry if my terminology is not correct).I'm trying to work out the best way to unit tes




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: