From d1ed127030d4285c17d0e51eb6f9de8611269c38 Mon Sep 17 00:00:00 2001 From: zy410419243 Date: Mon, 18 Mar 2019 16:11:04 +0800 Subject: [PATCH] pref: add missing mockRestore --- components/upload/__tests__/upload.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/upload/__tests__/upload.test.js b/components/upload/__tests__/upload.test.js index ec0802232d..29acae7649 100644 --- a/components/upload/__tests__/upload.test.js +++ b/components/upload/__tests__/upload.test.js @@ -379,8 +379,10 @@ describe('Upload', () => { ); const clearIntervalSpy = jest.spyOn(global, 'clearInterval'); expect(clearIntervalSpy).not.toHaveBeenCalled(); + clearIntervalSpy.mockRestore(); wrapper.unmount(); expect(clearIntervalSpy).toHaveBeenCalled(); + clearIntervalSpy.mockRestore(); }); it('corrent dragCls when type is drag', () => {