import { loggingSystemMock } from 'src/core/server/mocks' ; import { EsContext } from './context' ; import { namesMock } from './names.mock' ; import { IClusterClientAdapter } from './cluster_client_adapter' ; import { clusterClientAdapterMock } from './cluster_client_adapter.mock' ; const createContextMock = ( ) => { const mock = { logger : loggingSystemMock . createLogger ( ) , esNames : namesMock . create ( ) , initialize : jest . fn ( ) , shutdown : jest . fn ( ) , waitTillReady : jest . fn ( async ( ) => true ) , esAdapter : clusterClientAdapterMock . create ( ) , initialized : true , } ; return mock ; } ; export const contextMock = { create : createContextMock , } ;