title: TypeError: undefined is not a constructor (evaluating 'angular.controller('myView')')
body: <p>I'm getting the below error while doing karma/jasmine unit testing for both the test cases.I tried by modifying the controller by adding angular.controller in the spec file even then it is not working.Is there any way to fix?</p>
  
  <pre><code> TypeError: undefined is not a constructor (evaluating 'angular.controller('myView')') 
  </code></pre>
  
  <p>myView.spec.js</p>
  
  <pre><code>// myView.spec.js
  (function(){
  describe('controller: myView', function(){
  
  
       var module,myView,$q, $rootScope, $scope, uiGridConstants, overviewService, commonService, $timeout;
      beforeEach(function() {
          module = angular.module('app.myView');
          controller= angular.controller('myView')
      });
  
      beforeEach(inject(function ($controller, _$q_, _$rootScope_, _$timeout_) {
  
          $q= _$q_;
          $rootScope = _$rootScope_;
           $timeout= _$timeout_;
  
          myView= $controller('myView', {
              $q : _$q_,
              $rootScope :  _$rootScope_,
               $timeout:  _$timeout_
          });
  
  
      }));
  
      describe("myViewto be defined", function() {
          it("should be created successfully", function () {
              expect(controller).toBeDefined();
          });
  
          it("overview should be defined", function () {
              expect(myView()).toBeDefined();
          });
  
      });
  
  });
  
  })();
  </code></pre>
  
  <p>and myView.js</p>
  
  <pre><code>(function() {
      'use strict';
  
      angular
          .module('app.myView')
          .controller('myView', myView);
  
      function myView($q, $rootScope, $scope, uiGridConstants, myViewService, commonService, $timeout) {
          var vm = this;
          vm.callFeedback = function () { };
  })();
  </code></pre>