title: Ionic 3 with tabs: Error during cleanup of component
body: <p>I have an error at the end of each of my test (successed or failed) concerning tabs in ionic 3.</p>
  
  <p>It seems that it come from the <code>&lt;ion-tabs&gt;&lt;/ion-tabs&gt;</code> element in my tabs.html, because when I commented it, the error desappeared.</p>
  
  <p>I also can't use <code>fixture.destroy();</code> in my test it shows this error: </p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'unregisterChildNav' of null</p>
  </blockquote>
  
  <p>There's nothing more than the generated basic project tabs from ionic, by this command: <code>ionic start myApp tabs</code></p>
  
  <p>I've just added the spec for the tabs.</p>
  
  <p>If it could help, below is the code of my spec:</p>
  
  <pre class="lang-javascript prettyprint-override"><code>import { TestBed, ComponentFixture, async } from '@angular/core/testing'; 
  import { By } from '@angular/platform-browser'; 
  import { DebugElement } from '@angular/core'; 
  import { IonicModule } from 'ionic-angular';
  
  import { MyApp } from '../../app/app.component'; import { TabsPage } from './tabs';
  
  // import { ViewControllerMock } from '../../mocks';
  
  let comp: TabsPage; 
  let fixture: ComponentFixture&lt;TabsPage&gt;; 
  let de: DebugElement; 
  let deArray: DebugElement[]; 
  let el: HTMLElement;
  
  describe('Page: Tabs', () =&gt; {
  
    beforeEach(async(() =&gt; {
  
      TestBed.configureTestingModule({
  
        declarations: [MyApp, TabsPage],
  
        providers: [
        ],
  
        imports: [
          IonicModule.forRoot(MyApp)
        ]
  
      }).compileComponents();
  
    }));
  
    beforeEach(() =&gt; {
  
      fixture = TestBed.createComponent(TabsPage);
      comp    = fixture.componentInstance;
      // fixture.detectChanges();
  
    });
  
    afterEach(() =&gt; {
  
      // fixture.destroy();
  
      comp = null;
      de = null;
      el = null;   });
  
    it('should be created', () =&gt; {
  
      expect(fixture).toBeTruthy();
      expect(comp).toBeTruthy();
  
    });
  
    it ('should have 4 tabs', () =&gt; {
  
      deArray = fixture.debugElement.queryAll(By.css('ion-tabs ion-tab'));
  
      expect(deArray.length).toBe(4);
  
    });
  });
  </code></pre>
  
  <p>Hope someone could help me :)</p>