0
describe('Nav Bar', function() {
var injector;
var element;
var scope;
var compiler;
var httpBackend;

beforeEach(function() {
injector = angular.injector(['myApp', 'ngMockE2E']);
intercepts = {};

injector.invoke(function($rootScope, $compile, $httpBackend) {
  scope = $rootScope.$new();
  compiler = $compile;
  httpBackend = $httpBackend;
});
});

The below is the html file.

 <html ng-app="myApp">
  <head>
    <script type="text/javascript"
      src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.js">
    </script>

    <script type="text/javascript" src="/6-examples/app.js">
    </script>
  </head>

  <body>
    <user-menu></user-menu>
  </body>
</html>

This code is written as a test to check if the user info is getting stored correctly. How to resolve the error?

1 Answers1

0

I think the one and only reason is that you didn't include angular js file that that's why it is showing this error please make sure that it is add then check did you added the js file for ngMockE2E dependency

Hassan Tariq
  • 730
  • 7
  • 15