From 95f4a3f5c91cb55eb09d3858e23463cbf252825c Mon Sep 17 00:00:00 2001 From: Michael Stedman <46408716+recondesigns@users.noreply.github.com> Date: Sun, 3 Mar 2024 12:46:54 -0600 Subject: [PATCH] removed conditionals from tests and applied non-null assertion --- components/Cards/ResourceCard/__tests__/ResourceCard.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Cards/ResourceCard/__tests__/ResourceCard.test.tsx b/components/Cards/ResourceCard/__tests__/ResourceCard.test.tsx index eca7fca9a..80e84e586 100644 --- a/components/Cards/ResourceCard/__tests__/ResourceCard.test.tsx +++ b/components/Cards/ResourceCard/__tests__/ResourceCard.test.tsx @@ -16,7 +16,7 @@ describe('ResourceCard', () => { expect(handleVoteMock).not.toHaveBeenCalled(); - UpvoteButton && fireEvent.click(UpvoteButton); + fireEvent.click(UpvoteButton!); expect(handleVoteMock).toHaveBeenCalledTimes(1); expect(handleVoteMock).toHaveBeenCalledWith( @@ -34,7 +34,7 @@ describe('ResourceCard', () => { expect(handleVoteMock).not.toHaveBeenCalled(); - DownvoteButton && fireEvent.click(DownvoteButton); + fireEvent.click(DownvoteButton!); expect(handleVoteMock).toHaveBeenCalledTimes(1); expect(handleVoteMock).toHaveBeenCalledWith(