From ee59eafb44e3d29b598dcc90bdb78b224d61f2f3 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Sat, 30 Nov 2024 00:03:06 +1100 Subject: [PATCH] [8.x] [React18] Migrate test suites to account for testing library upgrades obs-ai-assistant,security-solution (#201165) (#202274) # Backport This will backport the following commits from `main` to `8.x`: - [[React18] Migrate test suites to account for testing library upgrades obs-ai-assistant,security-solution (#201165)](https://github.com/elastic/kibana/pull/201165) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Eyo O. Eyo <7893459+eokoneyo@users.noreply.github.com> --- .../data_usage/public/hooks/use_get_data_streams.test.tsx | 2 +- .../data_usage/public/hooks/use_get_usage_metrics.test.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/data_usage/public/hooks/use_get_data_streams.test.tsx b/x-pack/plugins/data_usage/public/hooks/use_get_data_streams.test.tsx index 5e224e635dca4..28be186a03805 100644 --- a/x-pack/plugins/data_usage/public/hooks/use_get_data_streams.test.tsx +++ b/x-pack/plugins/data_usage/public/hooks/use_get_data_streams.test.tsx @@ -7,7 +7,7 @@ import React, { ReactNode } from 'react'; import { QueryClient, QueryClientProvider, useQuery as _useQuery } from '@tanstack/react-query'; -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { useGetDataUsageDataStreams } from './use_get_data_streams'; import { DATA_USAGE_DATA_STREAMS_API_ROUTE } from '../../common'; import { coreMock as mockCore } from '@kbn/core/public/mocks'; diff --git a/x-pack/plugins/data_usage/public/hooks/use_get_usage_metrics.test.tsx b/x-pack/plugins/data_usage/public/hooks/use_get_usage_metrics.test.tsx index 4532126bc1a58..a507c67207599 100644 --- a/x-pack/plugins/data_usage/public/hooks/use_get_usage_metrics.test.tsx +++ b/x-pack/plugins/data_usage/public/hooks/use_get_usage_metrics.test.tsx @@ -7,7 +7,7 @@ import React, { ReactNode } from 'react'; import { QueryClient, QueryClientProvider, useQuery as _useQuery } from '@tanstack/react-query'; -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { useGetDataUsageMetrics } from './use_get_usage_metrics'; import { DATA_USAGE_METRICS_API_ROUTE } from '../../common'; import { coreMock as mockCore } from '@kbn/core/public/mocks';