diff --git a/src/plugins/discover/public/application/main/hooks/use_inspector.test.ts b/src/plugins/discover/public/application/main/hooks/use_inspector.test.ts index c8ff8c934036c..7f30ef8c51b47 100644 --- a/src/plugins/discover/public/application/main/hooks/use_inspector.test.ts +++ b/src/plugins/discover/public/application/main/hooks/use_inspector.test.ts @@ -21,7 +21,7 @@ describe('test useInspector', () => { let adapters: Adapters | undefined; jest.spyOn(discoverServiceMock.inspector, 'open').mockImplementation((localAdapters) => { adapters = localAdapters; - return {} as OverlayRef; + return { close: jest.fn() } as unknown as OverlayRef; }); const requests = new RequestAdapter(); const lensRequests = new RequestAdapter(); @@ -32,7 +32,7 @@ describe('test useInspector', () => { inspectorAdapters: { requests, lensRequests }, savedSearch: savedSearchMock, inspector: discoverServiceMock.inspector, - stateContainer: getDiscoverStateMock({ isTimeBased: true }), + stateContainer, }); }); await act(async () => {