diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index 39da3638ec..2f656c476a 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -52,7 +52,6 @@ "@backstage/test-utils": "^0.1.10", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", - "@testing-library/react-hooks": "^3.4.2", "@testing-library/user-event": "^12.0.7", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", diff --git a/plugins/fossa/src/components/getProjectName.test.ts b/plugins/fossa/src/components/getProjectName.test.ts index 461cb18ed7..93f5187890 100644 --- a/plugins/fossa/src/components/getProjectName.test.ts +++ b/plugins/fossa/src/components/getProjectName.test.ts @@ -15,7 +15,6 @@ */ import { Entity } from '@backstage/catalog-model'; -import { renderHook } from '@testing-library/react-hooks'; import { getProjectName } from './getProjectName'; describe('getProjectName', () => { @@ -31,9 +30,7 @@ describe('getProjectName', () => { }, }; - const { result } = renderHook(() => getProjectName(entity)); - - expect(result.current).toBe('test'); + expect(getProjectName(entity)).toBe('test'); }); it('should return undefined', async () => { @@ -45,8 +42,6 @@ describe('getProjectName', () => { }, }; - const { result } = renderHook(() => getProjectName(entity)); - - expect(result.current).toBeUndefined(); + expect(getProjectName(entity)).toBeUndefined(); }); });