From 5447358dc9e7c817c0d8f470b185e8ba3a5bf93d Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Tue, 3 Oct 2023 17:13:04 +0200 Subject: [PATCH] catalog-react: use correct waitFor Signed-off-by: Vincenzo Scamporlino --- .../components/UserListPicker/useAllEntitiesCount.test.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/catalog-react/src/components/UserListPicker/useAllEntitiesCount.test.tsx b/plugins/catalog-react/src/components/UserListPicker/useAllEntitiesCount.test.tsx index 61c2c6eb0a..fc2c0e65bd 100644 --- a/plugins/catalog-react/src/components/UserListPicker/useAllEntitiesCount.test.tsx +++ b/plugins/catalog-react/src/components/UserListPicker/useAllEntitiesCount.test.tsx @@ -16,7 +16,6 @@ import React, { PropsWithChildren } from 'react'; import { CatalogApi } from '@backstage/catalog-client'; import { useAllEntitiesCount } from './useAllEntitiesCount'; -import { waitFor } from '@testing-library/react'; import { renderHook } from '@testing-library/react-hooks'; import { EntityListProvider, useEntityList } from '../../hooks'; import { catalogApiRef } from '../../api'; @@ -62,7 +61,7 @@ describe('useAllEntitiesCount', () => { return <>{props.children}; } - const { result } = renderHook(() => useAllEntitiesCount(), { + const { result, waitFor } = renderHook(() => useAllEntitiesCount(), { wrapper: ({ children }) => ( @@ -90,7 +89,7 @@ describe('useAllEntitiesCount', () => { pageInfo: {}, }); - const { result } = renderHook(() => useAllEntitiesCount(), { + const { result, waitFor } = renderHook(() => useAllEntitiesCount(), { wrapper: ({ children }) => ( {children}