import { TestBed , tick , ComponentFixture } from '@angular/core/testing' ; export function advance ( fixture ) { tick ( ) ; fixture . detectChanges ( ) ; } export function createRoot ( type ) { const f = TestBed . createComponent ( type ) ; advance ( f ) ; return f ; }