Here is the code for my NewPageCtrl.js file:
angular.module('NewPageCtrl', []).controller('NewPageController', function($scope, $document) {
$scope.showMe = false;
});
And here is the content of test.js:
describe('NewPageCtrl', function() {
var scope, $document, createController;
beforeEach(inject(function ($rootScope, $controller _$document_) {
$document = _$document_;
scope = $rootScope.$new();
createController = function() {
return $controller('NewPageCtrl', {
'$scope': scope
});
};
}));
it('will include a test case to check showMe later', function() {
});
});
Currently, I am encountering an error with Jasmine:
Chrome 48.0.2564 (Mac OS X 10.10.5) ERROR
Uncaught SyntaxError: Unexpected identifier
at /Users/me/myProject/test/test.js:23
The error seems related to line 23 which is in the beforeEach(...) block.
The reference for this example can be found at