title: angular is not defined error when karma test invoked
body: <p>I'm sure this has something to do with angular-mock.js but I cant figure what I need to do as everything seems to be fine. I'm just going by the default setup from angular-seed app.
  Please help get rid of the problem</p>
  
  <p><strong>karma.conf.js</strong></p>
  
  <pre><code>module.exports = function(config){
    config.set({
  
      basePath : '../',
  
      files : [
        'bower_components/angular/angular.js',
        'bower_components/angular-route/angular-route.js',
        'bower_components/angular-mocks/angular-mocks.js',
        'app/js/**/*.js',
        'test/unit/**/*.js'
      ],
  
      autoWatch : true,
  
      frameworks: ['jasmine'],
  
      browsers : ['Chrome'],
  
      plugins : [
              'karma-chrome-launcher',
              'karma-firefox-launcher',
              'karma-jasmine'
              ],
  
      junitReporter : {
        outputFile: 'test_out/unit.xml',
        suite: 'unit'
      }
  
    });
  };
  </code></pre>
  
  <p><strong>controllers.js</strong></p>
  
  <pre><code>'use strict';
  /* Controllers */
  
  var app = angular.module('myApp.controllers', []);
  app.constant('RESTURL', 'http://'+ location.hostname + ':8003');
  
  app.controller('MainCtrl', ['$scope', 'dataService', 'flash', 'mySharedService','facetSearchService', 'facetSelectionService', 'RESTURL',  function($scope, dataService, flash, sharedService, facetSearch, facet, RESTURL) {
        $scope.RESTURL =  RESTURL;
        $scope.loading = true;
        $scope.data = null;
        $scope.resultCount = 0;
        $scope.currentPage = 0;
        $scope.pageSize = 10;
  
            ....
  ])}
  </code></pre>
  
  <p><strong>controllerSpec.js</strong></p>
  
  <pre><code>'use strict';
  
  /* jasmine specs for controllers go here */
  
  describe('controllers', function(){
    beforeEach(module('myApp.controllers'));
  
  
    it('should test MainCtrl', inject(function($controller) {
      //spec body
      var scope = {},
      ctrl = $controller('MainCtrl', {$scope:scope});
  
      expect($scope.RESTURL).toBe('http://'+ location.hostname + ':8003'));
    }));
  
  
  });
  </code></pre>
  
  <p>Project file structure:
  <img src="https://i.stack.imgur.com/9DaZu.png" alt="enter image description here"></p>