运行angularjs + Jasmine + Karma测试时,出现以下错误:

我的测试脚本是:
describe('PhoneCat controllers', function() {
describe('PhoneListCtrl', function(){
it('should create "phones" model with 3 phones', inject(function($controller) {
var scope = {},
ctrl = $controller('PhoneListCtrl', { $scope: scope });
expect(scope.phones.length).toBe(3);
}));
});
});
Run Code Online (Sandbox Code Playgroud)
这段代码只是官方AngularJS教程的副本:http: //code.angularjs.org/1.2.0-rc.3/docs/tutorial/step_02
这是我的karma.conf.js文件的一部分:
// list of files / patterns to load in the browser
files: [
'js/bower_components/angular/angular.js',
'js/bower_components/angular/ngular-mocks.js',
'js/app/controllers.js',
'test/unit/*.js'
],
Run Code Online (Sandbox Code Playgroud)
错误是PhoneListCtrl没有定义,但我相信它是在上面的代码中定义和加载的.您认为这个问题是什么?谢谢!