import { async , ComponentFixture , TestBed } from '@angular/core/testing' ; import { RouterTestingModule } from '@angular/router/testing' ; import { HttpClientModule } from '@angular/common/http' ; import { NoopAnimationsModule } from '@angular/platform-browser/animations' ; import { StoreModule } from '@ngrx/store' ; import { EffectsModule } from '@ngrx/effects' ; import { StoreRouterConnectingModule } from '@ngrx/router-store' ; import { AppCommonModule } from '../app-common.module' ; import { PROVIDERS } from '../shared' ; import { reducers , effects } from '../shared/store' ; import { AppComponent } from './app.component' ; describe ( 'AppComponent' , ( ) => { let component ; let fixture ; beforeEach ( async ( ( ) => { TestBed . configureTestingModule ( { imports : [ AppCommonModule , RouterTestingModule , HttpClientModule , NoopAnimationsModule , StoreModule . forRoot ( { ... reducers , statusReducer : ( ) => ( { status : 'total' } ) } ) , EffectsModule . forRoot ( effects ) , StoreRouterConnectingModule , ] , declarations : [ AppComponent , ] , providers : [ ... PROVIDERS , ] , } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( AppComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;