import { SearchServiceSetup , SearchServiceStart } from './search_service' ; import { of } from 'rxjs' ; const createSetupMock = ( ) => { const mock = { registerResultProvider : jest . fn ( ) , } ; return mock ; } ; const createStartMock = ( ) => { const mock = { find : jest . fn ( ) , getSearchableTypes : jest . fn ( ) , } ; mock . find . mockReturnValue ( of ( { results : [ ] } ) ) ; mock . getSearchableTypes . mockResolvedValue ( [ ] ) ; return mock ; } ; export const searchServiceMock = { createSetupContract : createSetupMock , createStartContract : createStartMock , } ;