I'm trying to get a basic unit test working and am running into an issue using angular-mocks.js. Hopefully this code will explain my situation.
describe("peconfigApp", function () {
beforeEach(function() {
angular.mock.module('peconfigApp');
});
describe("Binaries Controller", function () {
it("should work", function () {
expect(true).toBe(true);
});
});
});
Jasmine result error:
TypeError: Object #<Object> has no method 'module'
at null.<anonymous> (http://localhost:58141/Tests/js/controller-tests.js:4:22)
at jasmine.Block.execute (http://localhost:58141/Tests/lib/jasmine.js:1064:17)
I've placed alerts in different parts of the code to verify that angular-mocks.js is loading before my tests load and run so I am pretty sure loading is not an issue.
<script type="text/javascript" src="../lib/angular.min.js"></script>
<script type="text/javascript" src="../lib/angular-mocks.js"></script>
<script type="text/javascript" src="lib/jasmine.js"></script>
<script type="text/javascript" src="lib/jasmine-html.js"></script>
<script type="text/javascript" src="../js/controllers.js"></script>
<script type="text/javascript" src="js/controller-tests.js"></script>