2016-01-17 49 views
3

这是从karma.conf.js文件中使用beforeEach beforeEach(注(函数(...)...);部分代码导致此错误 当我尝试运行测试:不能与注射功能

PhantomJS 1.9.8 (Windows 8 0.0.0) my.test "before each" hook: workFn for "exists" FAILED 
     Error: [$injector:modulerr] Failed to instantiate module ng due to: 
     TypeError: 'undefined' is not an object (evaluating 'Function.prototype.bind.apply') 

我找不出什么问题。有人有任何想法吗?谢谢。

回答

0

我从Angular 1.5.0降级到1.2.29,现在测试没有错误。