import { pluginServices } from './services' ; import { PluginServiceRegistry } from '../../presentation_util/public' ; import { CustomIntegrationsSetup , CustomIntegrationsStart } from './types' ; import { CustomIntegrationsServices } from './services' ; import { providers } from './services/stub' ; function createCustomIntegrationsSetup ( ) { const mock = { getAppendCustomIntegrations : jest . fn ( ) , getReplacementCustomIntegrations : jest . fn ( ) , } ; return mock ; } function createCustomIntegrationsStart ( ) { const registry = new PluginServiceRegistry < CustomIntegrationsServices > ( providers ) ; pluginServices . setRegistry ( registry . start ( { } ) ) ; const ContextProvider = pluginServices . getContextProvider ( ) ; return { ContextProvider : jest . fn ( ContextProvider ) , } ; } export const customIntegrationsMock = { createSetup : createCustomIntegrationsSetup , createStart : createCustomIntegrationsStart , } ;