import { TestBed , waitForAsync } from '@angular/core/testing' ; import { NativeScrollbarSizeFactory } from './native-scrollbar-size-factory' ; describe ( 'NativeScrollSizeFactory Service' , ( ) => { let service ; beforeEach ( waitForAsync ( ( ) => { service = TestBed . inject ( NativeScrollbarSizeFactory ) ; } ) ) ; it ( 'should be created' , ( ) => { expect ( service ) . toBeDefined ( ) ; } ) ; it ( 'should emit the native scrollbar size' , ( doneFn ) => { service . scrollbarSize . subscribe ( ( size ) => { expect ( size ) . toBe ( 0 ) ; doneFn ( ) ; } ) ; } ) ; } ) ;