Pat*_*eck 2 javascript jasmine angularjs angular-ui karma-runner
我ui-router在Angular项目中使用.为了测试,我正在使用Karma和Jasmine.
运行时Karma,我收到以下错误:
Uncaught TypeError: Cannot read property 'isDefined' of undefined
at /Applications/MAMP/htdocs/examtesting/js/vendor/angular-ui-router.min.js:7
Run Code Online (Sandbox Code Playgroud)
我如何通过这个?
这是整个终端:
patrickreck@Patricks-MacBook-Pro /A/M/h/examtesting> karma start karma.conf.js
INFO [karma]: Karma v0.12.16 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 35.0.1916 (Mac OS X 10.9.2)]: Connected on socket xtivwYEP-4sBQAeAlsMl with id 73870853
Chrome 35.0.1916 (Mac OS X 10.9.2) ERROR
Uncaught TypeError: Cannot read property 'isDefined' of undefined
at /Applications/MAMP/htdocs/examtesting/js/vendor/angular-ui-router.min.js:7
Run Code Online (Sandbox Code Playgroud)
Mat*_*ley 21
isDefined可能是angular变量的属性.也许角度库没有正确加载.
你可以发布Karma配置文件吗?Angular需要在angular-ui-router.js之前加载.
| 归档时间: |
|
| 查看次数: |
7134 次 |
| 最近记录: |