How to access angular app module that is defined in self invoke?
<p>I want use unit test in angular, but the <code>webapp</code> that I working on it is created on its owe structure. for example :</p>

<pre><code>(function() {
'use strict';
angular
  .module('app', [
    'ngAnimate',
    'ui.load',
    'ui.jp',
    'oc.lazyLoad'
  ]);})();
</code></pre>

<p>And one of its controllers :</p>

<pre><code>(function() {
'use strict';
angular
    .module('app')
    .controller('EditorCtrl', EditorCtrl);

    function EditorCtrl($scope) {
      var vm = $scope;
      vm.options = {
        toolbar: [
          ['style', ['bold', 'italic', 'underline', 'clear']],
        ]
      };
    }})();
</code></pre>

<p>And I have no idea how to use unit test to this app because my test cant find controller.</p>

<p>This is my controller and test :</p>

<pre><code>   (function () {
  'use strict';
  angular
    .module('app')
    .controller('DashboardCtrl', dashboard);
    describe('test dashboard', function () {

      beforeEach(module('DashboardCtrl'));

      var $controller;

      beforeEach(inject(function (_$controller_) {
        $controller = _$controller_;
      }));

      describe('sum', function () {
        it('1 + 1 should equal 2', function () {
          var $scope = {};
          var controller = $controller('DashboardCtrl', {$scope: $scope});
          $scope.x = 1;
          $scope.y = 2;
          $scope.sum();
          expect($scope.z).toBe(3);
        });

        it('z should default to zero', function () {
          var $scope = {};
          var controller = $controller('DashboardCtrl', {$scope: $scope});
          expect($scope.z).toBe(0);
        });
      });

    });
  function dashboard($scope) {
    $scope.name = 'Dashboard';
    $scope.z = 0;
    $scope.sum = function () {
      $scope.z = $scope.x + $scope.y;
    };
  }


})();
</code></pre>

<p>And in karma test show me this <code>error</code> :</p>

<blockquote>
  <p>Error: [$injector:modulerr] Failed to instantiate module DashboardCtrl due to:
          Error: [$injector:nomod] Module 'DashboardCtrl' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.</p>
</blockquote>

<p>That indicate that cant find <code>"DashboardCtrl"</code> controller.</p>