import { createMockGraphStore , MockedGraphEnvironment } from './mocks' ; import { syncBreadcrumbSaga , updateMetaData } from './meta_data' ; describe ( 'breadcrumb sync saga' , ( ) => { let env ; beforeEach ( ( ) => { env = createMockGraphStore ( { sagas : [ syncBreadcrumbSaga ] , } ) ; } ) ; it ( 'syncs breadcrumb initially' , ( ) => { expect ( env . mockedDeps . chrome . setBreadcrumbs ) . toHaveBeenCalled ( ) ; } ) ; it ( 'syncs breadcrumb with each change to meta data' , ( ) => { env . store . dispatch ( updateMetaData ( { } ) ) ; expect ( env . mockedDeps . chrome . setBreadcrumbs ) . toHaveBeenCalledTimes ( 2 ) ; } ) ; } ) ;