title: How do you test dependency injection in angular?
body: <p>I use typescript and angular. 
  So for example in controllers I have notation</p>
  
  <p>a)</p>
  
  <pre><code>export function Controller($scope: Scope) {}
  (&lt;any&gt;Controller).$inject = ['$scope'];
  </code></pre>
  
  <p>b) </p>
  
  <pre><code>export class Controller {
      constructor(private $scope) {} 
  }
  App.directive('someCoolDirective', function() {
  return {
    restrict: 'E',
    etc...
    controller: &lt;any[]&gt;['$scope', SomeCoolDirective.Controller],
    etc...
  };
  </code></pre>
  
  <p>});</p>
  
  <p>c) </p>
  
  <pre><code>App.directive('someDirectives', &lt;any[]&gt;[ '$parse', '$rootScope', '$compile',     'userPermissions', function($parse, $rootScope, $compile, userPermissions) { }
  </code></pre>
  
  <p>d) </p>
  
  <pre><code>services...
  </code></pre>
  
  <p>As you see there are different ways of specifing dependencies for DI after minification. 
  But we are only humans, I tend to forget   (Controller).$inject, or I add some dependency and forgot to add in array. If I don't specify it, it works, till minification. Than it is pain in the neck to find it out. Sometimes there is even no error in browser console.</p>
  
  <p><strong>Do you know some tool, that checks all controllers,services, directives and verifies that there is correct $inject ['$scope',... etc.] notation?</strong> That it matches all required dependencies? I want to automate in on out build server.</p>