20 lines
794 B
JavaScript
20 lines
794 B
JavaScript
import { describe, expect, test } from 'vitest';
|
|
import { render } from '@testing-library/dom';
|
|
import { PaginationComponent } from '../../../src/components/ui/PaginationComponent';
|
|
|
|
describe('PaginationComponent', () => {
|
|
test('renders the page numbers', async () => {
|
|
const { container } = render(<PaginationComponent />);
|
|
expect(container.querySelectorAll('.page-number')).toHaveLength(1);
|
|
});
|
|
|
|
test('renders the next button', async () => {
|
|
const { container } = render(<PaginationComponent />);
|
|
expect(container.querySelector('.next-button')).toBeInTheDocument();
|
|
});
|
|
|
|
test('renders the previous button', async () => {
|
|
const { container } = render(<PaginationComponent />);
|
|
expect(container.querySelector('.previous-button')).toBeInTheDocument();
|
|
});
|
|
}); |