From 4e331a5049f0b817ca1e5f26180f8a2bc766618c Mon Sep 17 00:00:00 2001 From: DiamondYuan Date: Fri, 1 Mar 2019 11:21:00 +0800 Subject: [PATCH] up --- components/input/__tests__/index.test.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/components/input/__tests__/index.test.js b/components/input/__tests__/index.test.js index 397be174c8..45c349e912 100644 --- a/components/input/__tests__/index.test.js +++ b/components/input/__tests__/index.test.js @@ -44,6 +44,27 @@ describe('TextArea', () => { expect(mockFunc).toHaveBeenCalledTimes(2); }); + it('should use settimeout when ', () => { + const backup = window.requestAnimationFrame; + const setTimeoutBackUp = window.setTimeout; + // window.requestAnimationFrame = null; + window.setTimeout = jest.fn((cb, time) => { + setTimeoutBackUp(cb, time); + }); + const wrapper = mount(