title: Angular.js + Karma + Jasmine: Unknown provider for service
body: <p>I'm writing a test for the following Angular.js service:</p>
  
  <pre><code>var module = angular.module('wp', [ 'aws', 'lodash', 'jquery', 'moment', 'wp.model' ]);
  
  /**
   * Wordpress service.
   */
  module.service('wpService', function(_, $http, $q, $aws, Post) {
      var self = this;
  
      /**
       * HTTP request.
       */
      this.http = function(config) {
          var $config = _.clone(config);
  
          if ($config.user &amp;&amp; $config.password) {
              $config.headers = $config.headers || {};
              $config.headers.Authorization = 'Basic ' + btoa($config.user + ':' + $config.password);
          }
  
          return $http($config);
      };
  
      // ..
  }
  </code></pre>
  
  <p>The test case is as follows:</p>
  
  <pre><code>/**
   * Unit tests for wpService.
   */
  describe('apService', function() {
  
      var wpService;
  
      beforeEach(angular.module('wp'));
  
      beforeEach(inject(function(_wpService_) {
          wpService = _wpService_;
      }));
  
      it('is defined', function() {
          expect(wpService).toBeDefined();
      });
  });
  </code></pre>
  
  <p>This looks to be about as text-book as it gets. Unfortunately, I'm getting the following error:</p>
  
  <pre><code>Chrome 43.0.2357 (Mac OS X 10.10.3) apService is defined FAILED
  TypeError: queueableFn.fn.call is not a function
  Error: [$injector:unpr] Unknown provider: wpServiceProvider &lt;- wpService
  http://errors.angularjs.org/1.4.1/$injector/unpr?p0=wpServiceProvider%20%3C-%20wpService
      at /Users/jdolan/Coding/tuuli-syndicate/bower_components/angular/angular.js:68:12
  </code></pre>
  
  <p>My karma.config.js includes the modules as well as <code>angular-mocks.js</code>:</p>
  
  <pre><code>// list of files / patterns to load in the browser
      files : [ 'bower_components/jquery/dist/jquery.js',
                'bower_components/lodash/lodash.js',
                'bower_components/moment/moment.js',
                'bower_components/x2js/xml2json.js',
                'bower_components/aws-sdk/dist/aws-sdk.js',
                'bower_components/angular/angular.js',
                'bower_components/angular-route/angular-route.js',
                'bower_components/angular-mocks/angular-mocks.js',
                'app/**/*.js',
                'tests/**/*.js' ],
  </code></pre>
  
  <p>I'm using Angular 1.4.1, Karma 0.12.36.</p>