mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-30 20:38:45 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
20 lines
689 B
TypeScript
20 lines
689 B
TypeScript
import React from 'react';
|
|
|
|
import ConfigProvider from '..';
|
|
import { render } from '../../../tests/utils';
|
|
import Pagination from '../../pagination';
|
|
|
|
describe('ConfigProvider.Pagination', () => {
|
|
it('showSizeChanger', () => {
|
|
// Default have
|
|
const sharedNode = <Pagination total={1000} />;
|
|
const { container: rawContainer } = render(sharedNode);
|
|
expect(rawContainer.querySelector('.ant-pagination-options-size-changer')).toBeTruthy();
|
|
|
|
const { container } = render(
|
|
<ConfigProvider pagination={{ showSizeChanger: false }}>{sharedNode}</ConfigProvider>,
|
|
);
|
|
expect(container.querySelector('.ant-pagination-options-size-changer')).toBeFalsy();
|
|
});
|
|
});
|