/** * @vitest-environment jsdom */ import React, { memo } from "react"; import { act } from "react"; import { createRoot, type Root } from "react-dom/client"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import type { DraggableListDragHandleProps } from "./draggable-list.types"; import { DraggableList, type DraggableRenderItemInfo } from "./draggable-list.web"; interface Item { id: string; } const items: Item[] = [{ id: "one" }]; function keyExtractor(item: Item): string { return item.id; } function onDragEnd() {} let root: Root | null = null; let container: HTMLElement | null = null; let rowRenderCount = 0; const Row = memo(function Row({ dragHandleProps: _dragHandleProps, }: { dragHandleProps?: DraggableListDragHandleProps; }) { rowRenderCount += 1; return