mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-05-04 04:33:10 +00:00
Small Bug Fixes and Improvements
This commit is contained in:
parent
dbbd727554
commit
8c3b4b734e
10 changed files with 106 additions and 22 deletions
26
__tests__/blog-page.test.tsx
Normal file
26
__tests__/blog-page.test.tsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { render, screen } from '@testing-library/react';
|
||||
|
||||
import Page from '@/app/(main)/blog/page';
|
||||
|
||||
describe('Blog Page', () => {
|
||||
it('renders blog page unchanged', () => {
|
||||
const { container } = render(<Page />);
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders a heading', () => {
|
||||
render(<Page />);
|
||||
|
||||
const heading = screen.getByRole('heading', { level: 1 });
|
||||
|
||||
expect(heading).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders blog posts', () => {
|
||||
render(<Page />);
|
||||
|
||||
const posts = screen.getAllByRole('heading', { level: 2 });
|
||||
|
||||
expect(posts.length).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue