mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-05-01 11:19:34 +00:00
Started Adding Jest and Tests
This commit is contained in:
parent
542405be98
commit
64c366998e
9 changed files with 3047 additions and 59 deletions
18
__tests__/index.test.tsx
Normal file
18
__tests__/index.test.tsx
Normal 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();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue