import React from "react" import { render } from "@testing-library/react" import { assert } from "chai" import ClickOutHandler from "../src/ClickOutHandler" interface RefChildProps { /** Ref forwarded to the underlying button. */ ref?: React.Ref } /** Child component that receives `ref` as a normal prop under React 19. */ function RefChild(props: RefChildProps) { return } describe("ClickOutHandler", function () { it("forwards React 19 ref props when cloning a single child", function () { const ref = React.createRef() render( {}}> ) assert.instanceOf(ref.current, HTMLButtonElement) }) })