From 63073c97c78821cfb368698b81dfc495f12538eb Mon Sep 17 00:00:00 2001 From: Sunny Sahsi Date: Tue, 7 Nov 2023 13:28:32 +0530 Subject: [PATCH] test: removing test which generate snpshots --- __tests__/components/ProfileIcon.test.tsx | 5 ----- __tests__/components/Toast.test.tsx | 16 ---------------- __tests__/pages/login.test.tsx | 5 ----- 3 files changed, 26 deletions(-) diff --git a/__tests__/components/ProfileIcon.test.tsx b/__tests__/components/ProfileIcon.test.tsx index fe2ba6e..ef5d75a 100644 --- a/__tests__/components/ProfileIcon.test.tsx +++ b/__tests__/components/ProfileIcon.test.tsx @@ -3,11 +3,6 @@ import { render } from '@testing-library/react'; import ProfileIcon from '@/components/ProfileIcon/ProfileIcon'; describe('ProfileIcon', () => { - it('should render', () => { - const { container } = render(); - expect(container).toMatchSnapshot(); - }); - it('should have the correct initials', () => { const { container } = render(); expect(container).toHaveTextContent('SS'); diff --git a/__tests__/components/Toast.test.tsx b/__tests__/components/Toast.test.tsx index 2a6f9a8..a54a10c 100644 --- a/__tests__/components/Toast.test.tsx +++ b/__tests__/components/Toast.test.tsx @@ -5,28 +5,12 @@ import Toast from '../../src/components/Toast'; describe('Toast', () => { const onDismiss = jest.fn(); - test('should render the toast component', () => { - const { container } = render( - - ); - - expect(container).toMatchSnapshot(); - }); - test('should render the toast component with the message', () => { render(); expect(screen.getByText('This is a toast message')).toBeInTheDocument(); }); - test('should not render the toast component', () => { - const { container } = render( - - ); - - expect(container).toMatchSnapshot(); - }); - test('should not call onDismiss function when the timeToShow is not completed', () => { render(); diff --git a/__tests__/pages/login.test.tsx b/__tests__/pages/login.test.tsx index 6b1da04..21a5fe2 100644 --- a/__tests__/pages/login.test.tsx +++ b/__tests__/pages/login.test.tsx @@ -2,11 +2,6 @@ import { fireEvent, render } from '@testing-library/react'; import LoginPage from '../../src/pages/login'; describe('LoginPage', () => { - it('should render without throwing an error', () => { - const { container } = render(); - expect(container).toMatchSnapshot(); - }); - it('should render username input', () => { const { getByLabelText } = render(); const usernameInput = getByLabelText('username') as HTMLInputElement;