При запуски теста , я получаю ReferenceError: describe is not defined , в чём может быть проблема из
данной структуры проекта ?
describe('PhoneListController', function() {
beforeEach(module('phonecatApp'));
it('should create a `phones` model with 3 phones', inject(function($controller) {
var scope = {};
var ctrl = $controller('PhoneListController', {$scope: scope});
expect(scope.phones.length).toBe(3);
}));
});
var phoneCatApp = angular.module('phoneCatApp',[]);
phoneCatApp.controller("PhoneListController",function PhoneListController($scope) {
$scope.phones = [ // that way i adding property to the object in mine case the scope!
{name:'Nexus S',snippet:'Fast just got faster with Nexus S.'},
{name:'Motorola XOOM™ with Wi-Fi',snippet:'The Next, Next Generation tablet.'},
{name:'MOTOROLA XOOM™',snippet:'The Next, Next Generation tablet.'}
];
});
<!DOCTYPE html>
<html lang="en" ng-app="phoneCatApp">
<head>
<meta charset="UTF-8">
<title>PhoneCat</title>
<link rel="stylesheet" href="../css/index.css">
<script src="../../lib/angular.min.js"></script>
<script src="../../lib/karma.conf.js"></script>
<script src="../../controllers/controller.js"></script>
<script src="../../tests/phoneCatAppTests.js"></script>
</head>
<body ng-controller="PhoneListController">
<ul>
<li ng-repeat="phone in phones">
<span>{{phone.name}}</span>
<p>
{{phone.snippet}}
</p>
</li>
</ul>
</body>
</html>