Skip to content

Commit 88d0ac6

Browse files
committed
fix: test error
1 parent 7f46856 commit 88d0ac6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/touch.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,15 @@ describe('List.Touch', () => {
8686
return wrapper.find('.rc-virtual-list-holder').instance();
8787
}
8888

89+
const preventDefault = jest.fn();
90+
8991
act(() => {
9092
// start
9193
const touchEvent = new Event('touchstart');
9294
touchEvent.touches = [{ pageY: 500 }];
9395
getElement().dispatchEvent(touchEvent);
9496

9597
// move
96-
const preventDefault = jest.fn();
9798
const moveEvent = new Event('touchmove');
9899
moveEvent.touches = [{ pageY: 0 }];
99100
moveEvent.preventDefault = preventDefault;

0 commit comments

Comments
 (0)