import { httpServiceMock } from '../../../../../src/core/server/mocks' ; import { registerRoutes } from './index' ; describe ( 'registerRoutes' , ( ) => { it ( 'foo' , ( ) => { const router = httpServiceMock . createRouter ( ) ; registerRoutes ( router ) ; expect ( router . post ) . toHaveBeenCalledTimes ( 1 ) ; expect ( router . post ) . toHaveBeenCalledWith ( expect . objectContaining ( { path : '/internal/global_search/find' , } ) , expect . any ( Function ) ) ; expect ( router . get ) . toHaveBeenCalledTimes ( 1 ) ; expect ( router . get ) . toHaveBeenCalledWith ( expect . objectContaining ( { path : '/internal/global_search/searchable_types' , } ) , expect . any ( Function ) ) ; expect ( router . delete ) . toHaveBeenCalledTimes ( 0 ) ; expect ( router . put ) . toHaveBeenCalledTimes ( 0 ) ; } ) ; } ) ;