import { LayoutModule } from '@angular/cdk/layout' ; import { NoopAnimationsModule } from '@angular/platform-browser/animations' ; import { ComponentFixture , TestBed , waitForAsync } from '@angular/core/testing' ; import { MatButtonModule } from '@angular/material/button' ; import { MatCardModule } from '@angular/material/card' ; import { MatGridListModule } from '@angular/material/grid-list' ; import { MatIconModule } from '@angular/material/icon' ; import { MatMenuModule } from '@angular/material/menu' ; import { DashboardComponent } from './dashboard.component' ; import { BuilderDataService } from './service/builder-data.service' ; import { of , Subject } from 'rxjs' ; describe ( 'DashboardComponent' , ( ) => { let component ; let fixture ; let builderDataServiceStub ; let searchText = new Subject < string > ( ) ; builderDataServiceStub = { getBuilderData : jasmine . createSpy ( ) . and . returnValue ( of ( [ ] ) ) , filterText$ : searchText . asObservable ( ) } ; beforeEach ( waitForAsync ( ( ) => { TestBed . configureTestingModule ( { declarations : [ DashboardComponent ] , imports : [ NoopAnimationsModule , LayoutModule , MatButtonModule , MatCardModule , MatGridListModule , MatIconModule , MatMenuModule , ] , providers : [ { provide : BuilderDataService , useValue : builderDataServiceStub } ] , } ) . compileComponents ( ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( DashboardComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should compile' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;