mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
add jest.runAllTimers
This commit is contained in:
parent
3c381c6dd1
commit
7e96ae1a6a
@ -49,9 +49,11 @@ describe('Mention', () => {
|
||||
wrapper.find('DraftEditorContents').simulate('focus');
|
||||
const ed = wrapper.find('.public-DraftEditor-content');
|
||||
ed.simulate('beforeInput', { data: '@' });
|
||||
jest.runAllTimers();
|
||||
expect(wrapper.find('Nav').length).toBe(2);
|
||||
expect(wrapper.find('Nav').first().text()).toBe('afc163');
|
||||
wrapper.setState({ suggestions: ['yesmeck', 'yiminghe', 'lucy'] });
|
||||
jest.runAllTimers();
|
||||
expect(wrapper.find('Nav').length).toBe(3);
|
||||
expect(wrapper.find('Nav').first().text()).toBe('yesmeck');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user