We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12f299b commit 83d74d3Copy full SHA for 83d74d3
tests/index.test.tsx
@@ -260,6 +260,18 @@ describe('Other props', () => {
260
expect(prev).toHaveStyle('color: red');
261
expect(next).toHaveStyle('color: red');
262
});
263
+ it('should have 5 items when there are 3 pages and current page is 2', () => {
264
+ const { container } = render(
265
+ <Pagination
266
+ total={15}
267
+ pageSize={5}
268
+ current={2}
269
+ classNames={{ item: 'custom-test' }}
270
+ />,
271
+ );
272
+ const items = container.querySelectorAll('.custom-test');
273
+ expect(items.length).toBe(5);
274
+ });
275
it('should support custom default icon', () => {
276
const nextIcon = () => <span>nextIcon</span>;
277
const prevIcon = () => <span>prevIcon</span>;
0 commit comments