Hello I am struggling to load my module in my jasmine testing app
my main module looks like this
app.js
var app = angular.module('app', ['ngResource', 'ngRoute', 'ngAnimate',
'ui.bootstrap', 'ui.ace', 'ngTable', 'Settings', 'rm-autocomplete',
'angular-loading-bar', 'ui.select', 'ngSanitize', 'xeditable',
'dialogs.main', 'angularFileUpload', 'chart.js']);
my testjasmine.js
/// <reference path="../app/app.js" />
/// <reference path="../lib/angular/angular.js" />
/// <reference path="../lib/angular-mocks/angular-mocks.js" />
describe('jasmineApp', function () {
var scope = {};
beforeEach(angular.module('app',[]));
beforeEach(angular.inject(function ($rootScope, $controller) {
scope = $rootScope.$new();
$controller('clientsController', { $scope: scope });
}));
it('name is eric', inject(function () {
expect(scope.page).toEqual(0);
}));
});
Unhandled exception at line 3, column 1 in
file:///C:/ProjectsWeb/Public/app/app.js
0x800a1391 - JavaScript runtime error: 'angular' is undefined
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.