From 2991e93b15d53ed47100384f05d633fbc721992d Mon Sep 17 00:00:00 2001 From: wuxh Date: Fri, 6 Jan 2023 17:46:28 +0800 Subject: [PATCH] test: add case --- components/menu/__tests__/index.test.tsx | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/components/menu/__tests__/index.test.tsx b/components/menu/__tests__/index.test.tsx index 1a5c47b692c3..2b46dde6c59b 100644 --- a/components/menu/__tests__/index.test.tsx +++ b/components/menu/__tests__/index.test.tsx @@ -1047,4 +1047,34 @@ describe('Menu', () => { ); errorSpy.mockRestore(); }); + + it('expandIconClassName', () => { + const Demo = ({ expandIcon }: Pick) => ( + + ); + + const { container, rerender } = render( + } />, + ); + expect(container.querySelector('.custom-expand-icon')).toBeTruthy(); + + rerender( } />); + expect(container.querySelector('.function-custom-expand-icon')).toBeTruthy(); + }); });