import { coreMock , httpServiceMock , loggingSystemMock } from 'src/core/server/mocks' ; import { ConfigSchema } from '../config' ; import { elasticsearchServiceMock } from '../elasticsearch_service.mock' ; import { kibanaConfigWriterMock } from '../kibana_config_writer.mock' ; import { verificationCodeMock } from '../verification_code.mock' ; export const routeDefinitionParamsMock = { create : ( config = { } ) => ( { router : httpServiceMock . createRouter ( ) , basePath : httpServiceMock . createBasePath ( ) , csp : httpServiceMock . createSetupContract ( ) . csp , logger : loggingSystemMock . create ( ) . get ( ) , preboot : { ... coreMock . createPreboot ( ) . preboot , completeSetup : jest . fn ( ) } , getConfig : jest . fn ( ) . mockReturnValue ( ConfigSchema . validate ( config ) ) , elasticsearch : elasticsearchServiceMock . createSetup ( ) , verificationCode : verificationCodeMock . create ( ) , kibanaConfigWriter : kibanaConfigWriterMock . create ( ) , } ) , } ;