title: Using Jasmine to test Angular 2 App with Router
body: <p>I have an Angular 2 application that uses the Router to navigation to different pages. I want to test if routing is done correctly from one component to another, either by calling a function that contains <code>this.router.parent.navigate</code> or "clicking" a UI component to trigger the navigation. </p>
  
  <p><strong>First Question:</strong> Is Jasmine the framework a good choice to go with testing this or should Jasmine be left to strictly for unit testing each component by itself?</p>
  
  <p><strong>Second Question:</strong> If Jasmine is capable or is a good choice for accomplishing such a task, how do I go about creating a test for my component that takes in a Router (when it is done at the root for the app) and assign <code>RouteConfig</code> paths to that router? Below is my code attempt... but of course it fails.</p>
  
  <pre><code>describe('MyApp', () =&gt; {
  
      beforeEachProviders(() =&gt; [Router]);
  
      it('should have name property set', inject([Router], (router: Router) =&gt; {
          let myApp = new MyApp(router);
          expect(myApp).toBeDefined();
      }));
  });
  </code></pre>