From cefbb0203ea7fcf626a123abaab69eca3eef57c8 Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Tue, 26 Nov 2024 12:39:01 +0200 Subject: [PATCH] Fix types --- .../src/common/hooks/use_search_alerts_query.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_search_alerts_query.test.tsx b/packages/kbn-alerts-ui-shared/src/common/hooks/use_search_alerts_query.test.tsx index 8d8e1a3694fba..c3ccf7528b9e1 100644 --- a/packages/kbn-alerts-ui-shared/src/common/hooks/use_search_alerts_query.test.tsx +++ b/packages/kbn-alerts-ui-shared/src/common/hooks/use_search_alerts_query.test.tsx @@ -127,11 +127,11 @@ describe('useSearchAlertsQuery', () => { }); it('calls searchAlerts with correct arguments', async () => { - const { result, waitForValueToChange } = renderHook(() => useSearchAlertsQuery(params), { + const { result } = renderHook(() => useSearchAlertsQuery(params), { wrapper, }); - await waitForValueToChange(() => result.current.data); + await waitFor(() => expect(result.current.data).toBeDefined()); expect(mockDataPlugin.search.search).toHaveBeenCalledWith( {