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 f13fd0a commit ee7e7cdCopy full SHA for ee7e7cd
tests/index.test.js
@@ -3,6 +3,27 @@ import { mount } from 'enzyme';
3
import Select from 'rc-select';
4
import Pagination from '../src';
5
6
+describe('Default Pagination', () => {
7
+ let wrapper;
8
+ const onChange = jest.fn();
9
+
10
+ beforeEach(() => {
11
+ wrapper = mount(<Pagination onChange={onChange} />);
12
+ });
13
14
+ afterEach(() => {
15
+ wrapper.unmount();
16
+ onChange.mockReset();
17
18
19
+ it('onChange should be forbidden when total is default', () => {
20
+ const pagers = wrapper.find('.rc-pagination-item');
21
+ const page1 = pagers.at(0);
22
+ page1.simulate('click');
23
+ expect(onChange).toBeCalledTimes(0);
24
25
+});
26
27
describe('Uncontrolled Pagination', () => {
28
let wrapper;
29
const onChange = jest.fn();
0 commit comments