import { GlobalSearchPluginSetup , GlobalSearchPluginStart } from './types' ; import { searchServiceMock } from './services/search_service.mock' ; const createSetupMock = ( ) : jest . Mocked < GlobalSearchPluginSetup > => { const searchMock = searchServiceMock . createSetupContract ( ) ; return { registerResultProvider : searchMock . registerResultProvider , } ; } ; const createStartMock = ( ) : jest . Mocked < GlobalSearchPluginStart > => { const searchMock = searchServiceMock . createStartContract ( ) ; return { find : searchMock . find , getSearchableTypes : searchMock . getSearchableTypes , } ; } ; export const globalSearchPluginMock = { createSetupContract : createSetupMock , createStartContract : createStartMock , } ;