PhantomJS 1.9.8(Windows 7 0.0.0)错误ReferenceError:无法findvariables:angular度

我有Node v4.1.1npm v2.14.4Karma version: 0.13.15并遵循本教程http://mcgivery.com/unit-testing-ionic-app/来testing我的IONIC应用程序。

我正在尝试运行testing时遇到此错误

 PhantomJS 1.9.8 (Windows 7 0.0.0) ERROR ReferenceError: Can't find variable: angular at D:/IONIC/ionic-testing/www/js/app.js:8 

请帮我解决这个问题。

确保你实际上在files加载“angular度”,并且它是列表中第一个要提供的文件:

 files: [ '../www/lib/angular/angular.js', // make sure this path is the first one and is a valid one '../www/js/*.js', '../www/lib/angular-mocks/angular-mocks.js', '**/*tests.js' ], 
Interesting Posts