阅读背景:

$ httpBackend.flush()仍然需要超时来定义对象

来源:互联网 

I am unittesting my AngularJS app with Karma and stubbing the backend with $HttpBackend. Somehow, the flush() method does not seem to resolve all my requests as some of the variables in the controller still remain undefined. However, if I add a timeout before resolving my expectation it works fine!I am unittesting my AngularJS app with Karma an




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

分享到: