mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
test: Update message test case (#38766)
This commit is contained in:
parent
cef8bf899c
commit
f9ef37e9be
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { SmileOutlined } from '@ant-design/icons';
|
||||
import message, { actWrapper } from '..';
|
||||
import { act, fireEvent, sleep } from '../../../tests/utils';
|
||||
import { act, fireEvent, waitFakeTimer } from '../../../tests/utils';
|
||||
import { awaitPromise, triggerMotionEnd } from './util';
|
||||
|
||||
describe('message', () => {
|
||||
@ -139,7 +139,7 @@ describe('message', () => {
|
||||
act(() => {
|
||||
jest.advanceTimersByTime(1000);
|
||||
});
|
||||
await sleep(); // Wait to let event loop run
|
||||
await waitFakeTimer(); // Wait to let event loop run
|
||||
expect(onClose).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user