Started Adding Jest and Tests

This commit is contained in:
Ahmad 2024-12-28 17:36:50 -05:00
parent 542405be98
commit 64c366998e
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
9 changed files with 3047 additions and 59 deletions

18
__tests__/index.test.tsx Normal file
View file

@ -0,0 +1,18 @@
import '@testing-library/jest-dom';
import { render, screen } from '@testing-library/react';
import Page from '@/app/(main)/page';
describe('Home', () => {
it('renders homepage unchanged', () => {
const { container } = render(<Page />);
expect(container).toMatchSnapshot();
});
it('renders a heading', () => {
render(<Page />);
const heading = screen.getByRole('heading', { level: 1 });
expect(heading).toBeInTheDocument();
});
});