export const MockClient = jest . fn ( ) ; jest . mock ( 'elasticsearch' , ( ) => { const original = jest . requireActual ( 'elasticsearch' ) ; return { ... original , Client : MockClient , } ; } ) ; export const MockScopedClusterClient = jest . fn ( ) ; jest . mock ( './scoped_cluster_client' , ( ) => ( { LegacyScopedClusterClient : MockScopedClusterClient , } ) ) ; export const mockParseOpenSearchClientConfig = jest . fn ( ) ; jest . mock ( './opensearch_client_config' , ( ) => ( { parseOpenSearchClientConfig : mockParseOpenSearchClientConfig , } ) ) ;