@wonderflow/react-components
Version:
UI components from Wonderflow's Wanda design system
15 lines (14 loc) • 609 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { fireEvent, render } from '@testing-library/react';
import { Pagination } from './pagination';
describe('<Pagination>', () => {
test(' it should render properly', () => {
const fn = jest.fn();
const { container, getByTestId } = render(_jsx(Pagination, { itemsCount: 100, onPageClick: fn }));
fireEvent.click(getByTestId('RightChevron'));
expect(fn).toHaveBeenCalled();
fireEvent.click(getByTestId('RightChevron'));
expect(fn).toHaveBeenCalled();
expect(container).not.toBeNull();
});
});