mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-22 22:48:29 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
20 lines
538 B
TypeScript
20 lines
538 B
TypeScript
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(
|
|
<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',
|
|
);
|
|
});
|
|
});
|