import { mockOpenSearchDashboardsMigrator } from './migrations/opensearch_dashboards/opensearch_dashboards_migrator.mock' ; import { savedObjectsClientProviderMock } from './service/lib/scoped_client_provider.mock' ; import { typeRegistryMock } from './saved_objects_type_registry.mock' ; export const migratorInstanceMock = mockOpenSearchDashboardsMigrator . create ( ) ; export const OpenSearchDashboardsMigratorMock = jest . fn ( ) . mockImplementation ( ( ) => migratorInstanceMock ) ; jest . doMock ( './migrations/opensearch_dashboards/opensearch_dashboards_migrator' , ( ) => ( { OpenSearchDashboardsMigrator : OpenSearchDashboardsMigratorMock , } ) ) ; export const clientProviderInstanceMock = savedObjectsClientProviderMock . create ( ) ; jest . doMock ( './service/lib/scoped_client_provider' , ( ) => ( { SavedObjectsClientProvider : jest . fn ( ) . mockImplementation ( ( ) => clientProviderInstanceMock ) , } ) ) ; export const typeRegistryInstanceMock = typeRegistryMock . create ( ) ; jest . doMock ( './saved_objects_type_registry' , ( ) => ( { SavedObjectTypeRegistry : jest . fn ( ) . mockImplementation ( ( ) => typeRegistryInstanceMock ) , } ) ) ;