title: Angular 2 / Jasmine / Karma error: Error: Can't resolve all parameters for Router: (?, ?, ?, ?, ?, ?, ?, ?). in config/karma-shim.js
body: <p>Here is the service:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Injectable } from '@angular/core';
  import { Router, Event, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router';
  
  @Injectable()
  export class LoaderService {
  
    public shouldShowLoader: boolean = false;
  
    constructor(private router: Router) {
      router.events.subscribe((event: Event) =&gt; {
        this.navigationInterceptor(event);
      });
    }
  
      // Shows and hides the loading spinner during Event changes
      navigationInterceptor(event: Event): void {
          if (event instanceof NavigationStart) {
            this.shouldShowLoader = true;
          }
          else if (event instanceof NavigationEnd) {
            this.shouldShowLoader = false;
          }
  
          // Set loading state to false in both of the below events to hide the spinner in case a request fails
          else if (event instanceof NavigationCancel) {
            this.shouldShowLoader = false;
          }
          else if (event instanceof NavigationError) {
            this.shouldShowLoader = false;
          }
          else {
            this.shouldShowLoader = false;
          }
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is the test that is failing:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { TestBed, inject } from '@angular/core/testing';
  import { Router } from '@angular/router';
  import { LoaderService } from './loader.service';
  
  describe('LoaderServiceTest', () =&gt; {
      beforeEach(() =&gt; {
          TestBed.configureTestingModule({
              providers: [ LoaderService, Router ]
          });
      });
      
      it('#LoaderService should be defined', inject([LoaderService, Router], (service: LoaderService) =&gt; {
          expect(service).toBeDefined();
      }));
  
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>Not sure why it's failing? Googling for similar issues, I can only find answers for Angular 2 beta... we are using the latest Angular 2 / 2.2.0</p>