import { async , ComponentFixture , TestBed } from '@angular/core/testing' ; import { InfiniteScrollComponent } from './infinite-scroll.component' ; describe ( 'InfiniteScrollComponent' , ( ) => { let component ; let fixture ; beforeEach ( async ( ( ) => { TestBed . configureTestingModule ( { declarations : [ InfiniteScrollComponent ] } ) . compileComponents ( ) ; ( window as any ) . IntersectionObserver = jest . fn ( ( ) => ( { observe : jest . fn ( ) , unobserve : jest . fn ( ) } ) ) ; } ) ) ; beforeEach ( ( ) => { fixture = TestBed . createComponent ( InfiniteScrollComponent ) ; component = fixture . componentInstance ; fixture . detectChanges ( ) ; } ) ; it ( 'should create' , ( ) => { expect ( component ) . toBeTruthy ( ) ; } ) ; } ) ;