diff --git a/src/plugins/data/public/search/search_service.test.ts b/src/plugins/data/public/search/search_service.test.ts index 738f1e8ffbca..15356fb1a31b 100644 --- a/src/plugins/data/public/search/search_service.test.ts +++ b/src/plugins/data/public/search/search_service.test.ts @@ -26,11 +26,15 @@ describe('Search service', () => { let searchService: SearchService; let mockCoreSetup: MockedKeys; let mockCoreStart: MockedKeys; + const initializerContext = coreMock.createPluginInitializerContext(); + initializerContext.config.get = jest.fn().mockReturnValue({ + search: { aggs: { shardDelay: { enabled: false } } }, + }); beforeEach(() => { - searchService = new SearchService(); mockCoreSetup = coreMock.createSetup(); mockCoreStart = coreMock.createStart(); + searchService = new SearchService(initializerContext); }); describe('setup()', () => {