diff --git a/components/drawer/__tests__/MultiDrawer.test.js b/components/drawer/__tests__/MultiDrawer.test.js index 1580734eb4..a1d0c782a4 100644 --- a/components/drawer/__tests__/MultiDrawer.test.js +++ b/components/drawer/__tests__/MultiDrawer.test.js @@ -149,9 +149,12 @@ describe('Drawer', () => { fireEvent.click(wrapper.querySelector('button#open_two_drawer')); fireEvent.click(wrapper.querySelector('button#remove_drawer')); - expect(wrapper.querySelector('.ant-drawer-content-wrapper')).toHaveStyle({ - transform: '', - }); + // Strange, testing-lib get wrong style in next branch. + expect(wrapper.querySelector('.ant-drawer-content-wrapper').style).toEqual( + expect.objectContaining({ + transform: '', + }), + ); fireEvent.click(wrapper.querySelector('button#open_two_drawer')); expect(wrapper.querySelector('.ant-drawer-content-wrapper')).toHaveStyle({ @@ -182,8 +185,10 @@ describe('Drawer', () => { const { container: wrapper } = render(); fireEvent.click(wrapper.querySelector('button#open_drawer')); fireEvent.click(wrapper.querySelector('button#open_two_drawer')); - expect(wrapper.querySelector('.ant-drawer-content-wrapper')).toHaveStyle({ - transform: '', - }); + expect(wrapper.querySelector('.ant-drawer-content-wrapper').style).toEqual( + expect.objectContaining({ + transform: '', + }), + ); }); });