From 7ac10aa7fb123faa57b19ff3d15d792c3a84f1c2 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Tue, 21 Mar 2023 15:36:18 +0100 Subject: [PATCH] Fix jest test --- .../public/application/main/hooks/use_inspector.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 () => {