From 6f102b96ed1b58471fc62388230636a91c2ab5fb Mon Sep 17 00:00:00 2001 From: Eyo Okon Eyo Date: Thu, 2 Jan 2025 10:18:01 +0100 Subject: [PATCH] fix mock --- .../graph/src/hooks/use_fetch_graph_data.test.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.test.tsx b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.test.tsx index 94327b66a3754..7a3b010aca1d7 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.test.tsx +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.test.tsx @@ -8,7 +8,12 @@ import { renderHook } from '@testing-library/react'; import { useFetchGraphData } from './use_fetch_graph_data'; -const mockUseQuery = jest.fn(); +const mockUseQuery = jest.fn((...args: unknown[]) => ({ + isLoading: true, + data: null, + isError: false, + isFetching: true, +})); jest.mock('@tanstack/react-query', () => { return {