From c6405f301da43657edb852467f3043bd145a3e5e Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 22 Sep 2024 20:36:05 +0800 Subject: [PATCH] add test case --- tests/sizer.test.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/sizer.test.tsx b/tests/sizer.test.tsx index a710e352..1783287c 100644 --- a/tests/sizer.test.tsx +++ b/tests/sizer.test.tsx @@ -92,6 +92,23 @@ describe('Pagination with sizer', () => { { value: '75', label: '75 条每页' }, { value: '100', label: '100 条每页' }, ]; + + it('showSizeChanger.className should be added to select node', async () => { + const { container } = render( + , + ); + const select = container.querySelector('.rc-select'); + expect(select.className).toContain('custom-class-name'); + expect(select.className).toContain('rc-pagination-options-size-changer'); + }); + it('should onChange called when pageSize change', () => { const onChange = jest.fn(); const { container, getByRole } = render(