((props, ref) =>
>
{
const listHolder = container.querySelector('.rc-virtual-list-holder');
if (targetItem && listHolder) {
selectElementText(targetItem);
-
+
fireEvent.scroll(listHolder, { target: { scrollTop: 100 } });
expect(onScroll).toHaveBeenCalled();
const scrollCallCountBeforeDrop = onScroll.mock.calls.length;
@@ -805,7 +805,7 @@ describe('List.Scroll', () => {
const sel = window.getSelection();
sel && sel.removeAllRanges();
-
+
document.removeEventListener('dragstart', onDragStart);
document.removeEventListener('dragend', onDragEnd);
});
diff --git a/tests/scrollWidth.test.tsx b/tests/scrollWidth.test.tsx
index 79a141c1..fbbe203a 100644
--- a/tests/scrollWidth.test.tsx
+++ b/tests/scrollWidth.test.tsx
@@ -1,14 +1,14 @@
import '@testing-library/jest-dom';
import { act, fireEvent, render } from '@testing-library/react';
-import { _rs as onLibResize } from 'rc-resize-observer/lib/utils/observerUtil';
-import { spyElementPrototypes } from 'rc-util/lib/test/domHook';
+import { _rs as onLibResize } from '@rc-component/resize-observer/lib/utils/observerUtil';
+import { spyElementPrototypes } from '@rc-component/util/lib/test/domHook';
import React from 'react';
import type { ListRef } from '../src';
import List, { type ListProps } from '../src';
const ITEM_HEIGHT = 20;
-function genData(count) {
+function genData(count: number) {
return new Array(count).fill(null).map((_, index) => ({ id: String(index) }));
}