|
|
@ -56,9 +56,10 @@ describe('Table.pagination', () => { |
|
|
|
|
|
|
|
it('fires change event', () => { |
|
|
|
const handleChange = jest.fn(); |
|
|
|
const handlePaginationChange = jest.fn(); |
|
|
|
const noop = () => {}; |
|
|
|
const wrapper = mount(createTable({ |
|
|
|
pagination: { ...pagination, onChange: noop, onShowSizeChange: noop }, |
|
|
|
pagination: { ...pagination, onChange: handlePaginationChange, onShowSizeChange: noop }, |
|
|
|
onChange: handleChange, |
|
|
|
})); |
|
|
|
|
|
|
@ -67,13 +68,15 @@ describe('Table.pagination', () => { |
|
|
|
expect(handleChange).toBeCalledWith( |
|
|
|
{ |
|
|
|
current: 2, |
|
|
|
onChange: noop, |
|
|
|
onChange: handlePaginationChange, |
|
|
|
onShowSizeChange: noop, |
|
|
|
pageSize: 2, |
|
|
|
}, |
|
|
|
{}, |
|
|
|
{} |
|
|
|
); |
|
|
|
|
|
|
|
expect(handlePaginationChange).toBeCalledWith(2, 2); |
|
|
|
}); |
|
|
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/4532
|
|
|
|