import { async , ComponentFixture , TestBed } from '@angular/core/testing' ; import { MockComponent } from 'ng2-mock-component' ; import { of } from 'rxjs' ; import { EventService } from '@core/event.service' ; import { MetadataService } from '@core/metadata.service' ; import { MetadataComponent } from './metadata.component' ; describe ( 'MetadataComponent' , ( ) => { let component ; let fixture ; beforeEach ( async ( ( ) => { const eventServiceStub = { event$ : of ( { } ) , product$ : of ( { } ) } ; const metadataServiceStub = { getMetadata : jasmine . createSpy ( 'metadataService::get' ) , metadata$ : of ( { } ) } ; TestBed . configureTestingModule ( { declarations : [ MetadataComponent , MockComponent ( { selector : 'shakemap-input' , inputs : [ 'smInput' ] } ) , MockComponent ( { inputs : [ 'smMultiGmpe' ] , selector : 'shakemap-multigmpe' } ) , MockComponent ( { selector : 'shakemap-output' , inputs : [ 'smOutput' ] } ) , MockComponent ( { inputs : [ 'smProcessing' ] , selector : 'shakemap-processing' } ) ] , providers : [ { provide : EventService , useValue : eventServiceStub } , { provide : MetadataService , useValue : metadataServiceStub } ] } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( MetadataComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;