From c1b7b8f81a51acb313b591a66e18e38589919f0c Mon Sep 17 00:00:00 2001 From: Sergio Vanacloig Date: Thu, 19 Oct 2023 11:21:23 +0200 Subject: [PATCH 1/2] fix(padded-container): tests --- malty/atoms/PaddedContainer/PaddedContainer.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/malty/atoms/PaddedContainer/PaddedContainer.test.tsx b/malty/atoms/PaddedContainer/PaddedContainer.test.tsx index 4e07adb65..a1ae0c8d7 100644 --- a/malty/atoms/PaddedContainer/PaddedContainer.test.tsx +++ b/malty/atoms/PaddedContainer/PaddedContainer.test.tsx @@ -10,9 +10,9 @@ const newText = 'New test text'; describe('paddedContainer', () => { it('renders with correct text', () => { const { rerender } = render({defaultText}); - expect(screen.getByText(defaultText)).not.toBeNull(); + expect(screen.getByText(defaultText)).toBeVisible(); rerender({newText}); - expect(screen.getByText(newText)).not.toBeNull(); + expect(screen.getByText(newText)).toBeVisible(); }); }); From d0adb3a106fde407a5b4b62fbb2a9eb5abb69e4c Mon Sep 17 00:00:00 2001 From: Sergio Vanacloig Date: Thu, 19 Oct 2023 15:45:09 +0200 Subject: [PATCH 2/2] Use should instead --- malty/atoms/PaddedContainer/PaddedContainer.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/malty/atoms/PaddedContainer/PaddedContainer.test.tsx b/malty/atoms/PaddedContainer/PaddedContainer.test.tsx index a1ae0c8d7..afe2da943 100644 --- a/malty/atoms/PaddedContainer/PaddedContainer.test.tsx +++ b/malty/atoms/PaddedContainer/PaddedContainer.test.tsx @@ -8,7 +8,7 @@ const defaultText = const newText = 'New test text'; describe('paddedContainer', () => { - it('renders with correct text', () => { + it('should render with correct text', () => { const { rerender } = render({defaultText}); expect(screen.getByText(defaultText)).toBeVisible();