Owz*_*zzz 2 require requirejs jasmine angularjs karma-runner
我正在尝试使用requireJS,AngularJS,Karma和Jasmine的组合来运行测试.
我有一个超级简单的规范,它做了一些非常基本的测试,但我不断收到以下错误:
TypeError: Object #<Object> has no method 'apply'
Error: Argument 'fn' is not a function, got Object
Run Code Online (Sandbox Code Playgroud)
我的配置文件可以在这里找到:
更改
beforeEach(angular.module(settings.appName)); //angular.module() is to recreate a module
Run Code Online (Sandbox Code Playgroud)
至
beforeEach(module(settings.appName)); //use module() to get the module and then inject to the test
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1521 次 |
| 最近记录: |