diff --git a/components/modal/__tests__/Modal.test.tsx b/components/modal/__tests__/Modal.test.tsx index 6feace83c9..96a2fe0039 100644 --- a/components/modal/__tests__/Modal.test.tsx +++ b/components/modal/__tests__/Modal.test.tsx @@ -118,7 +118,12 @@ describe('Modal', () => { }); it('should not render footer if null', () => { - const { container } = render(); - expect(container.querySelector('.ant-modal-footer')).toBeFalsy(); + render(); + expect(document.querySelector('.ant-modal-footer')).toBeFalsy(); + }); + + it('should render custom footer', () => { + render(footer} />); + expect(document.querySelector('.custom-footer')).toBeTruthy(); }); });