Browse Source

pref: add missing mockRestore

pull/15293/head
zy410419243 6 years ago
parent
commit
d1ed127030
  1. 2
      components/upload/__tests__/upload.test.js

2
components/upload/__tests__/upload.test.js

@ -379,8 +379,10 @@ describe('Upload', () => {
); );
const clearIntervalSpy = jest.spyOn(global, 'clearInterval'); const clearIntervalSpy = jest.spyOn(global, 'clearInterval');
expect(clearIntervalSpy).not.toHaveBeenCalled(); expect(clearIntervalSpy).not.toHaveBeenCalled();
clearIntervalSpy.mockRestore();
wrapper.unmount(); wrapper.unmount();
expect(clearIntervalSpy).toHaveBeenCalled(); expect(clearIntervalSpy).toHaveBeenCalled();
clearIntervalSpy.mockRestore();
}); });
it('corrent dragCls when type is drag', () => { it('corrent dragCls when type is drag', () => {

Loading…
Cancel
Save