From d1e89162e9d3bd9ef46450c485cef59f4a18f306 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Tue, 26 Nov 2024 16:17:36 +0100 Subject: [PATCH] catalog-react: remove unused Signed-off-by: Vincenzo Scamporlino --- .../useFacetsEntities.test.ts | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.test.ts b/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.test.ts index 44ff6bf21c..a714b31327 100644 --- a/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.test.ts +++ b/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.test.ts @@ -17,7 +17,6 @@ import { renderHook, waitFor } from '@testing-library/react'; import { useFacetsEntities } from './useFacetsEntities'; import { catalogApiMock } from '@backstage/plugin-catalog-react/testUtils'; -import { Entity, parseEntityRef } from '@backstage/catalog-model'; const mockCatalogApi = catalogApiMock.mock(); @@ -37,25 +36,6 @@ describe('useFacetsEntities', () => { }, }); - const entitiesFromEntityRefs = ( - entityRefs: string[], - enrichedEntities: { [key: string]: Entity } = {}, - ) => ({ - items: entityRefs.map(ref => { - const compoundRef = parseEntityRef(ref); - return ( - enrichedEntities[ref] || { - apiVersion: 'backstage.io/v1beta1', - kind: compoundRef.kind, - metadata: { - name: compoundRef.name, - namespace: compoundRef.namespace, - }, - } - ); - }), - }); - it(`should return empty items when facets are loading`, () => { mockCatalogApi.getEntityFacets.mockReturnValue(new Promise(() => {})); const { result } = renderHook(() => useFacetsEntities({ enabled: true }));