diff --git a/components/mention/__tests__/index.test.js b/components/mention/__tests__/index.test.js index bb866523a5..6aa9319875 100644 --- a/components/mention/__tests__/index.test.js +++ b/components/mention/__tests__/index.test.js @@ -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'); });