diff --git a/packages/core-app-api/src/app/AppContext.test.tsx b/packages/core-app-api/src/app/AppContext.test.tsx
index ee7b90533f..a011b5966b 100644
--- a/packages/core-app-api/src/app/AppContext.test.tsx
+++ b/packages/core-app-api/src/app/AppContext.test.tsx
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { useVersionedContext } from '@backstage/version-bridge';
import { AppContext as AppContextV1 } from './types';
import { AppContextProvider } from './AppContext';
diff --git a/packages/core-app-api/src/routing/RoutingProvider.beta.test.tsx b/packages/core-app-api/src/routing/RoutingProvider.beta.test.tsx
index 0f7a5cd3ad..84b7afeb09 100644
--- a/packages/core-app-api/src/routing/RoutingProvider.beta.test.tsx
+++ b/packages/core-app-api/src/routing/RoutingProvider.beta.test.tsx
@@ -17,7 +17,7 @@
import React, { PropsWithChildren, ReactElement } from 'react';
import { MemoryRouter, Routes } from 'react-router-dom';
import { render } from '@testing-library/react';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { useVersionedContext } from '@backstage/version-bridge';
import {
childDiscoverer,
diff --git a/packages/core-app-api/src/routing/RoutingProvider.stable.test.tsx b/packages/core-app-api/src/routing/RoutingProvider.stable.test.tsx
index 495fc20b15..23d556a79e 100644
--- a/packages/core-app-api/src/routing/RoutingProvider.stable.test.tsx
+++ b/packages/core-app-api/src/routing/RoutingProvider.stable.test.tsx
@@ -17,7 +17,7 @@
import React, { PropsWithChildren, ReactElement } from 'react';
import { MemoryRouter, Routes, Route, useOutlet } from 'react-router-dom';
import { render } from '@testing-library/react';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { useVersionedContext } from '@backstage/version-bridge';
import {
childDiscoverer,
diff --git a/packages/core-components/package.json b/packages/core-components/package.json
index 310a2cf231..77df614044 100644
--- a/packages/core-components/package.json
+++ b/packages/core-components/package.json
@@ -89,7 +89,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.0.0",
"@types/ansi-regex": "^5.0.0",
"@types/classnames": "^2.2.9",
diff --git a/packages/core-components/src/components/AutoLogout/disconnectedUsers.test.ts b/packages/core-components/src/components/AutoLogout/disconnectedUsers.test.ts
index 87d6369eda..3d097dcc7f 100644
--- a/packages/core-components/src/components/AutoLogout/disconnectedUsers.test.ts
+++ b/packages/core-components/src/components/AutoLogout/disconnectedUsers.test.ts
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { act } from 'react-dom/test-utils';
import {
diff --git a/packages/core-components/src/components/Link/Link.test.tsx b/packages/core-components/src/components/Link/Link.test.tsx
index f88d830479..42668b54c9 100644
--- a/packages/core-components/src/components/Link/Link.test.tsx
+++ b/packages/core-components/src/components/Link/Link.test.tsx
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-import React from 'react';
-import { fireEvent, waitFor, screen } from '@testing-library/react';
+import React, { ComponentType } from 'react';
+import { fireEvent, waitFor, screen, renderHook } from '@testing-library/react';
import {
MockAnalyticsApi,
TestApiProvider,
@@ -24,7 +24,6 @@ import {
import { analyticsApiRef, configApiRef } from '@backstage/core-plugin-api';
import { isExternalUri, Link, useResolvedPath } from './Link';
import { Route, Routes } from 'react-router-dom';
-import { renderHook, WrapperComponent } from '@testing-library/react-hooks';
import { ConfigReader } from '@backstage/config';
describe('', () => {
@@ -128,7 +127,7 @@ describe('', () => {
});
describe('useResolvedPath', () => {
- const wrapper: WrapperComponent> = ({
+ const wrapper: ComponentType> = ({
children,
}) => {
const configApi = new ConfigReader({
diff --git a/packages/core-components/src/components/LogViewer/useLogViewerSearch.test.tsx b/packages/core-components/src/components/LogViewer/useLogViewerSearch.test.tsx
index a64f22765b..1b54f552a5 100644
--- a/packages/core-components/src/components/LogViewer/useLogViewerSearch.test.tsx
+++ b/packages/core-components/src/components/LogViewer/useLogViewerSearch.test.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { act, renderHook } from '@testing-library/react-hooks';
+import { act, renderHook } from '@testing-library/react';
import { applySearchFilter, useLogViewerSearch } from './useLogViewerSearch';
import { AnsiLine } from './AnsiProcessor';
diff --git a/packages/core-components/src/components/LogViewer/useLogViewerSelection.test.tsx b/packages/core-components/src/components/LogViewer/useLogViewerSelection.test.tsx
index a828818ed5..6c6f7da71b 100644
--- a/packages/core-components/src/components/LogViewer/useLogViewerSelection.test.tsx
+++ b/packages/core-components/src/components/LogViewer/useLogViewerSelection.test.tsx
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import { act, renderHook } from '@testing-library/react-hooks';
+import { act, renderHook } from '@testing-library/react';
import { TestApiProvider, MockErrorApi } from '@backstage/test-utils';
import { errorApiRef } from '@backstage/core-plugin-api';
import { AnsiLine } from './AnsiProcessor';
diff --git a/packages/core-components/src/layout/Sidebar/Items.test.tsx b/packages/core-components/src/layout/Sidebar/Items.test.tsx
index 9479180180..6c959bfd0d 100644
--- a/packages/core-components/src/layout/Sidebar/Items.test.tsx
+++ b/packages/core-components/src/layout/Sidebar/Items.test.tsx
@@ -26,7 +26,7 @@ import HomeIcon from '@material-ui/icons/Home';
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
import { Sidebar } from './Bar';
import { SidebarItem, SidebarSearchField, SidebarExpandButton } from './Items';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { makeStyles } from '@material-ui/core/styles';
import { analyticsApiRef } from '@backstage/core-plugin-api';
diff --git a/packages/core-components/src/layout/Sidebar/SidebarOpenStateContext.test.tsx b/packages/core-components/src/layout/Sidebar/SidebarOpenStateContext.test.tsx
index f1900f025c..8cc6f7858c 100644
--- a/packages/core-components/src/layout/Sidebar/SidebarOpenStateContext.test.tsx
+++ b/packages/core-components/src/layout/Sidebar/SidebarOpenStateContext.test.tsx
@@ -16,7 +16,7 @@
import React, { ReactNode, useContext } from 'react';
import { renderWithEffects } from '@backstage/test-utils';
import { waitFor } from '@testing-library/react';
-import { renderHook, act } from '@testing-library/react-hooks';
+import { renderHook, act } from '@testing-library/react';
import {
LegacySidebarContext,
SidebarOpenStateProvider,
diff --git a/packages/core-components/src/layout/Sidebar/SidebarPinStateContext.test.tsx b/packages/core-components/src/layout/Sidebar/SidebarPinStateContext.test.tsx
index 8bd1597725..8f6660707d 100644
--- a/packages/core-components/src/layout/Sidebar/SidebarPinStateContext.test.tsx
+++ b/packages/core-components/src/layout/Sidebar/SidebarPinStateContext.test.tsx
@@ -16,7 +16,7 @@
import React, { ReactNode, useContext } from 'react';
import { renderWithEffects } from '@backstage/test-utils';
import { waitFor } from '@testing-library/react';
-import { renderHook, act } from '@testing-library/react-hooks';
+import { renderHook, act } from '@testing-library/react';
import {
LegacySidebarPinStateContext,
SidebarPinStateProvider,
diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json
index 12d02d2a07..0e6e15f28b 100644
--- a/packages/core-plugin-api/package.json
+++ b/packages/core-plugin-api/package.json
@@ -65,7 +65,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.0.0"
},
"files": [
diff --git a/packages/core-plugin-api/src/analytics/AnalyticsContext.test.tsx b/packages/core-plugin-api/src/analytics/AnalyticsContext.test.tsx
index 88e8afa6ef..c29ec5b3ca 100644
--- a/packages/core-plugin-api/src/analytics/AnalyticsContext.test.tsx
+++ b/packages/core-plugin-api/src/analytics/AnalyticsContext.test.tsx
@@ -16,7 +16,7 @@
import React from 'react';
import { render } from '@testing-library/react';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { AnalyticsContext, useAnalyticsContext } from './AnalyticsContext';
const AnalyticsSpy = () => {
diff --git a/packages/core-plugin-api/src/analytics/useAnalytics.test.tsx b/packages/core-plugin-api/src/analytics/useAnalytics.test.tsx
index 22021026af..037e585430 100644
--- a/packages/core-plugin-api/src/analytics/useAnalytics.test.tsx
+++ b/packages/core-plugin-api/src/analytics/useAnalytics.test.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { useAnalytics } from './useAnalytics';
import { useApi } from '../apis';
diff --git a/packages/core-plugin-api/src/apis/system/useApi.test.tsx b/packages/core-plugin-api/src/apis/system/useApi.test.tsx
index 6f473d8f59..4b9d80fb62 100644
--- a/packages/core-plugin-api/src/apis/system/useApi.test.tsx
+++ b/packages/core-plugin-api/src/apis/system/useApi.test.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { createVersionedContextForTesting } from '@backstage/version-bridge';
import { createApiRef } from './ApiRef';
import { useApi } from './useApi';
diff --git a/packages/core-plugin-api/src/app/useApp.test.tsx b/packages/core-plugin-api/src/app/useApp.test.tsx
index f2e330e847..34c956138e 100644
--- a/packages/core-plugin-api/src/app/useApp.test.tsx
+++ b/packages/core-plugin-api/src/app/useApp.test.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { createVersionedContextForTesting } from '@backstage/version-bridge';
import { useApp } from './useApp';
diff --git a/packages/core-plugin-api/src/extensions/useElementFilter.test.tsx b/packages/core-plugin-api/src/extensions/useElementFilter.test.tsx
index 9a3760d019..720b7e6838 100644
--- a/packages/core-plugin-api/src/extensions/useElementFilter.test.tsx
+++ b/packages/core-plugin-api/src/extensions/useElementFilter.test.tsx
@@ -15,7 +15,7 @@
*/
import React, { ReactNode } from 'react';
import { useElementFilter } from './useElementFilter';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { attachComponentData } from './componentData';
import { featureFlagsApiRef } from '../apis';
import { LocalStorageFeatureFlags } from '@backstage/core-app-api';
diff --git a/packages/core-plugin-api/src/routing/useRouteRef.test.tsx b/packages/core-plugin-api/src/routing/useRouteRef.test.tsx
index 7a03a1cdc4..b302fa6441 100644
--- a/packages/core-plugin-api/src/routing/useRouteRef.test.tsx
+++ b/packages/core-plugin-api/src/routing/useRouteRef.test.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import React from 'react';
import { MemoryRouter, Router } from 'react-router-dom';
import { createVersionedContextForTesting } from '@backstage/version-bridge';
diff --git a/packages/core-plugin-api/src/translation/useTranslationRef.test.tsx b/packages/core-plugin-api/src/translation/useTranslationRef.test.tsx
index 19f0516906..8433fb0f69 100644
--- a/packages/core-plugin-api/src/translation/useTranslationRef.test.tsx
+++ b/packages/core-plugin-api/src/translation/useTranslationRef.test.tsx
@@ -20,7 +20,7 @@ import {
TestApiProvider,
withLogCollector,
} from '@backstage/test-utils';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { createTranslationRef, TranslationRef } from './TranslationRef';
import { useTranslationRef } from './useTranslationRef';
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
diff --git a/packages/version-bridge/package.json b/packages/version-bridge/package.json
index 9b219c34ee..80671efe05 100644
--- a/packages/version-bridge/package.json
+++ b/packages/version-bridge/package.json
@@ -43,8 +43,7 @@
"devDependencies": {
"@backstage/cli": "workspace:^",
"@testing-library/jest-dom": "^6.0.0",
- "@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0"
+ "@testing-library/react": "^13.4.0"
},
"files": [
"dist"
diff --git a/packages/version-bridge/src/lib/VersionedContext.test.tsx b/packages/version-bridge/src/lib/VersionedContext.test.tsx
index 275e491324..4ffe3f45ca 100644
--- a/packages/version-bridge/src/lib/VersionedContext.test.tsx
+++ b/packages/version-bridge/src/lib/VersionedContext.test.tsx
@@ -15,7 +15,7 @@
*/
import React, { useContext } from 'react';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import {
createVersionedContext,
createVersionedContextForTesting,
diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json
index 069f7519e8..d167dbaf3a 100644
--- a/plugins/catalog-graph/package.json
+++ b/plugins/catalog-graph/package.json
@@ -60,7 +60,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.0.0"
},
"files": [
diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/useCatalogGraphPage.test.ts b/plugins/catalog-graph/src/components/CatalogGraphPage/useCatalogGraphPage.test.ts
index 7a4d836365..a89fa353d6 100644
--- a/plugins/catalog-graph/src/components/CatalogGraphPage/useCatalogGraphPage.test.ts
+++ b/plugins/catalog-graph/src/components/CatalogGraphPage/useCatalogGraphPage.test.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { RELATION_MEMBER_OF } from '@backstage/catalog-model';
-import { act, renderHook } from '@testing-library/react-hooks';
+import { act, renderHook } from '@testing-library/react';
import { useLocation as useLocationMocked } from 'react-router-dom';
import { Direction } from '../EntityRelationsGraph';
import { useCatalogGraphPage } from './useCatalogGraphPage';
diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationGraph.test.ts b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationGraph.test.ts
index 7e0cd411ce..420af5345c 100644
--- a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationGraph.test.ts
+++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationGraph.test.ts
@@ -19,7 +19,7 @@ import {
RELATION_OWNER_OF,
RELATION_PART_OF,
} from '@backstage/catalog-model';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { pick } from 'lodash';
import { useEntityRelationGraph } from './useEntityRelationGraph';
import { useEntityStore as useEntityStoreMocked } from './useEntityStore';
diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.test.ts b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.test.ts
index c2ee918e5b..526588d598 100644
--- a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.test.ts
+++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.test.ts
@@ -21,7 +21,7 @@ import {
RELATION_PART_OF,
stringifyEntityRef,
} from '@backstage/catalog-model';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { filter, keyBy } from 'lodash';
import { useEntityRelationGraph as useEntityRelationGraphMocked } from './useEntityRelationGraph';
import { useEntityRelationNodesAndEdges } from './useEntityRelationNodesAndEdges';
diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.test.ts b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.test.ts
index 802f993802..9e37aadbf5 100644
--- a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.test.ts
+++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.test.ts
@@ -16,7 +16,7 @@
import { Entity } from '@backstage/catalog-model';
import { useApi as useApiMocked } from '@backstage/core-plugin-api';
-import { act, renderHook } from '@testing-library/react-hooks';
+import { act, renderHook } from '@testing-library/react';
import { useEntityStore } from './useEntityStore';
jest.mock('@backstage/core-plugin-api');
diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json
index ace0d82613..3db78446d3 100644
--- a/plugins/catalog-import/package.json
+++ b/plugins/catalog-import/package.json
@@ -68,7 +68,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.0.0",
"msw": "^1.0.0"
},
diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx
index 0a6960cdc7..4e737bd115 100644
--- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx
+++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx
@@ -19,7 +19,7 @@ import { configApiRef } from '@backstage/core-plugin-api';
import { MockConfigApi, TestApiProvider } from '@backstage/test-utils';
import { makeStyles } from '@material-ui/core';
import { render, screen } from '@testing-library/react';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import React from 'react';
import { PreviewCatalogInfoComponent } from './PreviewCatalogInfoComponent';
diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewPullRequestComponent.test.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewPullRequestComponent.test.tsx
index d983b6d359..53485bedb5 100644
--- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewPullRequestComponent.test.tsx
+++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewPullRequestComponent.test.tsx
@@ -16,7 +16,7 @@
import { makeStyles } from '@material-ui/core';
import { render, screen } from '@testing-library/react';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import React from 'react';
import { PreviewPullRequestComponent } from './PreviewPullRequestComponent';
diff --git a/plugins/catalog-import/src/components/useImportState.test.tsx b/plugins/catalog-import/src/components/useImportState.test.tsx
index 155adb8290..2345b2d696 100644
--- a/plugins/catalog-import/src/components/useImportState.test.tsx
+++ b/plugins/catalog-import/src/components/useImportState.test.tsx
@@ -16,7 +16,7 @@
import { Entity, CompoundEntityRef } from '@backstage/catalog-model';
import { cleanup } from '@testing-library/react';
-import { act, renderHook } from '@testing-library/react-hooks';
+import { act, renderHook } from '@testing-library/react';
import { AnalyzeResult } from '../api';
import {
diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json
index 9f959b94b4..f0bf4e822b 100644
--- a/plugins/catalog-react/package.json
+++ b/plugins/catalog-react/package.json
@@ -85,7 +85,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.0.0",
"@types/zen-observable": "^0.8.0",
"react-test-renderer": "^16.13.1"
diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.test.ts b/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.test.ts
index 6f6da43307..8dbd382c25 100644
--- a/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.test.ts
+++ b/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.test.ts
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { useFacetsEntities } from './useFacetsEntities';
import { CatalogApi } from '@backstage/catalog-client';
diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/useQueryEntities.test.ts b/plugins/catalog-react/src/components/EntityOwnerPicker/useQueryEntities.test.ts
index d974709d34..f2986d296a 100644
--- a/plugins/catalog-react/src/components/EntityOwnerPicker/useQueryEntities.test.ts
+++ b/plugins/catalog-react/src/components/EntityOwnerPicker/useQueryEntities.test.ts
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { CatalogApi } from '@backstage/catalog-client';
import { useQueryEntities } from './useQueryEntities';
diff --git a/plugins/catalog-react/src/components/UnregisterEntityDialog/useUnregisterEntityDialogState.test.tsx b/plugins/catalog-react/src/components/UnregisterEntityDialog/useUnregisterEntityDialogState.test.tsx
index 8591cdad93..f305e68791 100644
--- a/plugins/catalog-react/src/components/UnregisterEntityDialog/useUnregisterEntityDialogState.test.tsx
+++ b/plugins/catalog-react/src/components/UnregisterEntityDialog/useUnregisterEntityDialogState.test.tsx
@@ -17,11 +17,7 @@
import { CatalogApi, Location } from '@backstage/catalog-client';
import { Entity, ANNOTATION_ORIGIN_LOCATION } from '@backstage/catalog-model';
import { catalogApiRef } from '../../api';
-import {
- act,
- renderHook,
- RenderHookResult,
-} from '@testing-library/react-hooks';
+import { act, renderHook, RenderHookResult } from '@testing-library/react';
import React, { ReactNode } from 'react';
import {
UseUnregisterEntityDialogState,
diff --git a/plugins/catalog-react/src/hooks/useEntity.test.tsx b/plugins/catalog-react/src/hooks/useEntity.test.tsx
index 8fc388654a..7f2a29efee 100644
--- a/plugins/catalog-react/src/hooks/useEntity.test.tsx
+++ b/plugins/catalog-react/src/hooks/useEntity.test.tsx
@@ -15,7 +15,7 @@
*/
import React, { PropsWithChildren } from 'react';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import {
useEntity,
useAsyncEntity,
diff --git a/plugins/catalog-react/src/hooks/useEntityListProvider.test.tsx b/plugins/catalog-react/src/hooks/useEntityListProvider.test.tsx
index da27c61dcb..7e54a82e71 100644
--- a/plugins/catalog-react/src/hooks/useEntityListProvider.test.tsx
+++ b/plugins/catalog-react/src/hooks/useEntityListProvider.test.tsx
@@ -25,7 +25,7 @@ import {
storageApiRef,
} from '@backstage/core-plugin-api';
import { MockStorageApi, TestApiProvider } from '@backstage/test-utils';
-import { act, renderHook } from '@testing-library/react-hooks';
+import { act, renderHook } from '@testing-library/react';
import qs from 'qs';
import React, { PropsWithChildren } from 'react';
import { MemoryRouter } from 'react-router-dom';
diff --git a/plugins/catalog-react/src/hooks/useEntityOwnership.test.tsx b/plugins/catalog-react/src/hooks/useEntityOwnership.test.tsx
index dc400b5c90..2fbc283cb4 100644
--- a/plugins/catalog-react/src/hooks/useEntityOwnership.test.tsx
+++ b/plugins/catalog-react/src/hooks/useEntityOwnership.test.tsx
@@ -18,7 +18,7 @@ import { CatalogApi } from '@backstage/catalog-client';
import { ComponentEntity, RELATION_OWNED_BY } from '@backstage/catalog-model';
import { IdentityApi, identityApiRef } from '@backstage/core-plugin-api';
import { TestApiProvider } from '@backstage/test-utils';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import React from 'react';
import { catalogApiRef } from '../api';
import { useEntityOwnership } from './useEntityOwnership';
diff --git a/plugins/catalog-react/src/hooks/useEntityPermission.test.tsx b/plugins/catalog-react/src/hooks/useEntityPermission.test.tsx
index aed6676838..0c389de747 100644
--- a/plugins/catalog-react/src/hooks/useEntityPermission.test.tsx
+++ b/plugins/catalog-react/src/hooks/useEntityPermission.test.tsx
@@ -15,7 +15,7 @@
*/
import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common/alpha';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { useEntityPermission } from './useEntityPermission';
import { useAsyncEntity } from './useEntity';
import { usePermission } from '@backstage/plugin-permission-react';
diff --git a/plugins/catalog-react/src/hooks/useRelatedEntities.test.tsx b/plugins/catalog-react/src/hooks/useRelatedEntities.test.tsx
index 8de7822d59..bd8116d6b3 100644
--- a/plugins/catalog-react/src/hooks/useRelatedEntities.test.tsx
+++ b/plugins/catalog-react/src/hooks/useRelatedEntities.test.tsx
@@ -16,7 +16,7 @@
import { Entity } from '@backstage/catalog-model';
import { TestApiProvider } from '@backstage/test-utils';
-import { WrapperComponent, renderHook } from '@testing-library/react-hooks';
+import { WrapperComponent, renderHook } from '@testing-library/react';
import React, { PropsWithChildren } from 'react';
import { catalogApiRef } from '../api';
import { useRelatedEntities } from './useRelatedEntities';
diff --git a/plugins/catalog-react/src/hooks/useStarredEntities.test.tsx b/plugins/catalog-react/src/hooks/useStarredEntities.test.tsx
index f21b3cb710..cde574e558 100644
--- a/plugins/catalog-react/src/hooks/useStarredEntities.test.tsx
+++ b/plugins/catalog-react/src/hooks/useStarredEntities.test.tsx
@@ -16,7 +16,7 @@
import { Entity } from '@backstage/catalog-model';
import { TestApiProvider } from '@backstage/test-utils';
-import { act, renderHook } from '@testing-library/react-hooks';
+import { act, renderHook } from '@testing-library/react';
import React, { PropsWithChildren } from 'react';
import {
starredEntitiesApiRef,
diff --git a/plugins/catalog-react/src/hooks/useStarredEntity.test.tsx b/plugins/catalog-react/src/hooks/useStarredEntity.test.tsx
index d24b27f903..272ba05b01 100644
--- a/plugins/catalog-react/src/hooks/useStarredEntity.test.tsx
+++ b/plugins/catalog-react/src/hooks/useStarredEntity.test.tsx
@@ -16,7 +16,7 @@
import { Entity, CompoundEntityRef } from '@backstage/catalog-model';
import { TestApiProvider } from '@backstage/test-utils';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import React, { PropsWithChildren } from 'react';
import Observable from 'zen-observable';
import { StarredEntitiesApi, starredEntitiesApiRef } from '../apis';
diff --git a/plugins/entity-feedback/package.json b/plugins/entity-feedback/package.json
index 01efea478f..1fb982f803 100644
--- a/plugins/entity-feedback/package.json
+++ b/plugins/entity-feedback/package.json
@@ -55,7 +55,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.0.0",
"msw": "^1.0.0"
},
diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json
index a8b60322ec..5b9db4f4b5 100644
--- a/plugins/git-release-manager/package.json
+++ b/plugins/git-release-manager/package.json
@@ -57,7 +57,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.0.0",
"@types/recharts": "^1.8.15",
"msw": "^1.0.0"
diff --git a/plugins/git-release-manager/src/features/CreateReleaseCandidate/hooks/useCreateReleaseCandidate.test.tsx b/plugins/git-release-manager/src/features/CreateReleaseCandidate/hooks/useCreateReleaseCandidate.test.tsx
index 25a987df2a..4ca9afbaff 100644
--- a/plugins/git-release-manager/src/features/CreateReleaseCandidate/hooks/useCreateReleaseCandidate.test.tsx
+++ b/plugins/git-release-manager/src/features/CreateReleaseCandidate/hooks/useCreateReleaseCandidate.test.tsx
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { renderHook, act } from '@testing-library/react-hooks';
+import { renderHook, act } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import {
diff --git a/plugins/git-release-manager/src/features/Patch/hooks/usePatch.test.ts b/plugins/git-release-manager/src/features/Patch/hooks/usePatch.test.ts
index 0bd7f27cdb..6d6b297d2a 100644
--- a/plugins/git-release-manager/src/features/Patch/hooks/usePatch.test.ts
+++ b/plugins/git-release-manager/src/features/Patch/hooks/usePatch.test.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { renderHook, act } from '@testing-library/react-hooks';
+import { renderHook, act } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import {
diff --git a/plugins/git-release-manager/src/features/PromoteRc/hooks/usePromoteRc.test.ts b/plugins/git-release-manager/src/features/PromoteRc/hooks/usePromoteRc.test.ts
index f4e0fcb081..bd69a3366f 100644
--- a/plugins/git-release-manager/src/features/PromoteRc/hooks/usePromoteRc.test.ts
+++ b/plugins/git-release-manager/src/features/PromoteRc/hooks/usePromoteRc.test.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { renderHook, act } from '@testing-library/react-hooks';
+import { renderHook, act } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import {
diff --git a/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.test.ts b/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.test.ts
index 8e89add810..d1bf28bccb 100644
--- a/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.test.ts
+++ b/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.test.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { renderHook, act } from '@testing-library/react-hooks';
+import { renderHook, act } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import { mockApiClient } from '../test-helpers/mock-api-client';
diff --git a/plugins/git-release-manager/src/hooks/useResponseSteps.test.ts b/plugins/git-release-manager/src/hooks/useResponseSteps.test.ts
index 513c51758d..f5b5ac056c 100644
--- a/plugins/git-release-manager/src/hooks/useResponseSteps.test.ts
+++ b/plugins/git-release-manager/src/hooks/useResponseSteps.test.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { renderHook, act } from '@testing-library/react-hooks';
+import { renderHook, act } from '@testing-library/react';
import { useResponseSteps } from './useResponseSteps';
@@ -74,7 +74,7 @@ describe('useResponseSteps', () => {
"icon": "failure",
"message":
Something went wrong
-
+
{
"icon": "failure",
"message":
Something went wrong
-
+
{
it('should allow the setting of secrets in the context', async () => {
diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json
index 1dec7ba98f..1ef6c70340 100644
--- a/plugins/scaffolder/package.json
+++ b/plugins/scaffolder/package.json
@@ -105,7 +105,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.0.0",
"@types/humanize-duration": "^3.18.1",
"@types/json-schema": "^7.0.9",
diff --git a/plugins/search-react/package.json b/plugins/search-react/package.json
index 7708d630c8..52277961d9 100644
--- a/plugins/search-react/package.json
+++ b/plugins/search-react/package.json
@@ -73,7 +73,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.0.0"
},
"files": [
diff --git a/plugins/search-react/src/components/SearchFilter/hooks.test.tsx b/plugins/search-react/src/components/SearchFilter/hooks.test.tsx
index 5135cd4ae6..567617fccf 100644
--- a/plugins/search-react/src/components/SearchFilter/hooks.test.tsx
+++ b/plugins/search-react/src/components/SearchFilter/hooks.test.tsx
@@ -16,7 +16,7 @@
import React from 'react';
import { ApiProvider } from '@backstage/core-app-api';
import { MockConfigApi, TestApiRegistry } from '@backstage/test-utils';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { searchApiRef } from '../../api';
import { SearchContextProvider, useSearch } from '../../context';
diff --git a/plugins/search-react/src/context/SearchContext.test.tsx b/plugins/search-react/src/context/SearchContext.test.tsx
index df71a848b0..64c3cbbded 100644
--- a/plugins/search-react/src/context/SearchContext.test.tsx
+++ b/plugins/search-react/src/context/SearchContext.test.tsx
@@ -16,7 +16,7 @@
import { configApiRef } from '@backstage/core-plugin-api';
import { render, screen, waitFor } from '@testing-library/react';
-import { act, renderHook } from '@testing-library/react-hooks';
+import { act, renderHook } from '@testing-library/react';
import { MockConfigApi, TestApiProvider } from '@backstage/test-utils';
import React from 'react';
import {
diff --git a/plugins/search/package.json b/plugins/search/package.json
index 23a6f991a8..c89c86e518 100644
--- a/plugins/search/package.json
+++ b/plugins/search/package.json
@@ -78,7 +78,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.0.0",
"history": "^5.0.0",
"msw": "^1.0.0"
diff --git a/plugins/search/src/components/SearchModal/useSearchModal.test.tsx b/plugins/search/src/components/SearchModal/useSearchModal.test.tsx
index e21f864ac2..a78f9b92af 100644
--- a/plugins/search/src/components/SearchModal/useSearchModal.test.tsx
+++ b/plugins/search/src/components/SearchModal/useSearchModal.test.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import React from 'react';
-import { act, renderHook } from '@testing-library/react-hooks';
+import { act, renderHook } from '@testing-library/react';
import { useSearchModal } from './useSearchModal';
import { BrowserRouter, Router } from 'react-router-dom';
import { createMemoryHistory } from 'history';
diff --git a/plugins/techdocs-react/package.json b/plugins/techdocs-react/package.json
index 37df5a207d..3abafb9ef1 100644
--- a/plugins/techdocs-react/package.json
+++ b/plugins/techdocs-react/package.json
@@ -58,8 +58,7 @@
"@backstage/test-utils": "workspace:^",
"@backstage/theme": "workspace:^",
"@testing-library/jest-dom": "^6.0.0",
- "@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0"
+ "@testing-library/react": "^13.4.0"
},
"files": [
"alpha",
diff --git a/plugins/techdocs-react/src/context.test.tsx b/plugins/techdocs-react/src/context.test.tsx
index 4800204f36..7890e755b4 100644
--- a/plugins/techdocs-react/src/context.test.tsx
+++ b/plugins/techdocs-react/src/context.test.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import React from 'react';
-import { renderHook, act } from '@testing-library/react-hooks';
+import { renderHook, act } from '@testing-library/react';
import { ThemeProvider } from '@material-ui/core';
diff --git a/plugins/techdocs-react/src/hooks.test.ts b/plugins/techdocs-react/src/hooks.test.ts
index 2aa53b32d5..0cd55fa10f 100644
--- a/plugins/techdocs-react/src/hooks.test.ts
+++ b/plugins/techdocs-react/src/hooks.test.ts
@@ -19,7 +19,7 @@ import {
useShadowRootElements,
useShadowRootSelection,
} from './hooks';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { fireEvent, waitFor } from '@testing-library/react';
const fireSelectionChangeEvent = (window: Window) => {
diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json
index 83603b0f6a..104f764d00 100644
--- a/plugins/techdocs/package.json
+++ b/plugins/techdocs/package.json
@@ -87,7 +87,6 @@
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.0.0",
"@types/dompurify": "^2.2.2",
"@types/event-source-polyfill": "^1.0.0",
diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPage/context.test.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPage/context.test.tsx
index 2380724960..e3d5a59587 100644
--- a/plugins/techdocs/src/reader/components/TechDocsReaderPage/context.test.tsx
+++ b/plugins/techdocs/src/reader/components/TechDocsReaderPage/context.test.tsx
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { ThemeProvider } from '@material-ui/core';
diff --git a/plugins/techdocs/src/reader/components/useReaderState.test.tsx b/plugins/techdocs/src/reader/components/useReaderState.test.tsx
index 5f3e2d9662..e3b60f6f25 100644
--- a/plugins/techdocs/src/reader/components/useReaderState.test.tsx
+++ b/plugins/techdocs/src/reader/components/useReaderState.test.tsx
@@ -16,7 +16,7 @@
import { NotFoundError } from '@backstage/errors';
import { TestApiProvider } from '@backstage/test-utils';
-import { act, renderHook } from '@testing-library/react-hooks';
+import { act, renderHook } from '@testing-library/react';
import React from 'react';
import { techdocsStorageApiRef } from '../../api';
import {
diff --git a/plugins/techdocs/src/reader/transformers/html/transformer.test.tsx b/plugins/techdocs/src/reader/transformers/html/transformer.test.tsx
index 2b1f427be3..ed5fbba085 100644
--- a/plugins/techdocs/src/reader/transformers/html/transformer.test.tsx
+++ b/plugins/techdocs/src/reader/transformers/html/transformer.test.tsx
@@ -15,7 +15,7 @@
*/
import React, { FC, PropsWithChildren } from 'react';
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { ConfigReader } from '@backstage/core-app-api';
import { ConfigApi, configApiRef } from '@backstage/core-plugin-api';
diff --git a/plugins/techdocs/src/reader/transformers/styles/transformer.test.ts b/plugins/techdocs/src/reader/transformers/styles/transformer.test.ts
index 84ba16d6e6..90244e96ad 100644
--- a/plugins/techdocs/src/reader/transformers/styles/transformer.test.ts
+++ b/plugins/techdocs/src/reader/transformers/styles/transformer.test.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { renderHook } from '@testing-library/react-hooks';
+import { renderHook } from '@testing-library/react';
import { useStylesTransformer } from './transformer';
describe('Transformers > Styles', () => {