mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
test: Fix resize related test case
This commit is contained in:
parent
adf990f8fb
commit
aec0f4517c
@ -115,6 +115,7 @@ describe('TextArea', () => {
|
||||
},
|
||||
},
|
||||
]);
|
||||
await Promise.resolve();
|
||||
|
||||
expect(onResize).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
|
@ -112,9 +112,10 @@ describe('PageHeader', () => {
|
||||
expect(render(wrapper)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('change container width', () => {
|
||||
it('change container width', async () => {
|
||||
const wrapper = mount(<PageHeader title="Page Title" extra="extra" />);
|
||||
wrapper.triggerResize();
|
||||
await Promise.resolve();
|
||||
wrapper.update();
|
||||
expect(wrapper.find('.ant-page-header').hasClass('ant-page-header-compact')).toBe(true);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user