From 4d3cbd860131e0e9eedd5ba1696d72568c2b6efc Mon Sep 17 00:00:00 2001 From: Dominik Henneke Date: Wed, 21 Apr 2021 09:12:39 +0200 Subject: [PATCH] Update test Signed-off-by: Dominik Henneke --- plugins/fossa/package.json | 1 - plugins/fossa/src/components/getProjectName.test.ts | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) 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(); }); });