After attempting to create a basic JavaScript unit test using angular.js, I encountered failure without understanding the reason behind it.
test.html
<html>
<head>
<script src="angular-1.2.21/angular-scenario.js" ng-autotest></script>
<script src="test1.js"></script>
</head>
</html>
test1.js
describe('A suite', function() {
it('should be true', function() {
expect(5).toBe(5);
});
});
Both files, along with their libraries, were uploaded onto a server and the HTML site was accessed. The tests executed but consistently resulted in failure:
expected undefined toBe 5 but was undefined
What could possibly be missing from my setup?