You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
537 B
19 lines
537 B
2 years ago
|
import React from 'react';
|
||
|
import Pagination from '..';
|
||
|
import { render } from '../../../tests/utils';
|
||
|
|
||
|
describe('Pagination simple mode', () => {
|
||
|
it('should support showTotal in simple mode', () => {
|
||
|
const { container } = render(
|
||
2 years ago
|
<Pagination
|
||
|
simple
|
||
|
total={100}
|
||
|
showTotal={(total: number, range: number[]) => `${range[0]}-${range[1]} of ${total} items`}
|
||
|
/>,
|
||
|
);
|
||
|
expect(container?.querySelector('.ant-pagination-total-text')).toHaveTextContent(
|
||
|
'1-10 of 100 items',
|
||
2 years ago
|
);
|
||
|
});
|
||
|
});
|