title: angular karma Export of name 'outlet' not found! Expected undefined to be truthy
body: <p>I have a router animation, which works well. Its fairly simple.
  However I cannot get the test to pass.</p>
  
  <p>I have the set up for it as below. </p>
  
  <pre><code>import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';
  import { RouterOutlet } from '@angular/router';
  import { fader } from 'app/route-animations';
  
  @Component({
      selector: 'app-logged-in-layout',
      templateUrl: './logged-in-layout.component.html',
      styleUrls: ['./logged-in-layout.component.less'],
      animations: [fader],
  })
  export class LoggedInLayoutComponent implements OnInit {
      constructor() {}
  
      prepareRoute(outlet: RouterOutlet) {
          return (
              outlet &amp;&amp;
              outlet.activatedRouteData &amp;&amp;
              outlet.activatedRouteData['animation']
          );
      }
  </code></pre>
  
  <p>The html is as follows</p>
  
  <pre><code>&lt;main [@routeAnimations]="prepareRoute(outlet)" class="content"&gt;
      &lt;router-outlet #outlet="outlet"&gt;&lt;/router-outlet&gt;
  &lt;/main&gt;
  </code></pre>
  
  <p>Below I have an image for the test results</p>
  
  <p><a href="https://i.stack.imgur.com/punn3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/punn3.png" alt="enter image description here"></a></p>
  
  <p>Now I realise there is a template ref called #outlet, but what I don't know is do I define that in the test file or the component file</p>
  
  <p>How would I do that?</p>
  
  <p>My test file is </p>
  
  <pre><code>import { async, ComponentFixture, TestBed } from '@angular/core/testing';
  
  import { LoggedInLayoutComponent } from './logged-in-layout.component';
  import { RouterOutlet } from '@angular/router';
  
  describe('LoggedInLayoutComponent', () =&gt; {
      let component: LoggedInLayoutComponent;
      let fixture: ComponentFixture&lt;LoggedInLayoutComponent&gt;;
  
      beforeEach(async(() =&gt; {
          TestBed.configureTestingModule({
              declarations: [LoggedInLayoutComponent],
              providers: [RouterOutlet],
          }).compileComponents();
      }));
  
      beforeEach(() =&gt; {
          fixture = TestBed.createComponent(LoggedInLayoutComponent);
          component = fixture.componentInstance;
          fixture.detectChanges();
      });
  
      it('should create', () =&gt; {
          expect(component).toBeTruthy();
      });
  
  });
  </code></pre>
  
  <p>Any guidance would be appreciated. </p>