import { render, screen } from '@test-utils';
import Pagination from './pagination';
const total = 50;
const perPage = 10;
describe('Pagination', () => {
  it('renders previous and next page links', () => {
    render();
    expect(
      screen.getByRole('link', { name: /Previous page/i })
    ).toBeInTheDocument();
    expect(
      screen.getByRole('link', { name: /Next page/i })
    ).toBeInTheDocument();
  });
  it('renders the page links except for the current one', () => {
    render(
      
    );
    expect(screen.getAllByRole('link', { name: /Page / })).toHaveLength(
      total / perPage - 1
    );
  });
});