import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { AppComponent } from './app.component'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { RoutingStateService } from './routing-state.service'; import { RouterTestingModule } from '@angular/router/testing'; describe('AppComponent', () => { let component: AppComponent; let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ AppComponent ], providers: [RoutingStateService], imports: [RouterTestingModule], schemas: [NO_ERRORS_SCHEMA] }).compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(AppComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create the app', async(() => { expect(component).toBeTruthy(); })); });