// @vitest-environment jsdom import { render, screen, waitFor } from "@testing-library/react"; import { describe, expect, it, vi } from "vitest"; vi.mock("@headlessui/react", async () => { const React = await import("react"); const { Fragment } = React; function Transition({ as: As = Fragment, children }) { if (As === Fragment) return <>{children}; return {children}; } function Disclosure({ defaultOpen = true, children }) { const content = typeof children === "function" ? children({ open: defaultOpen }) : children; return
{content}
; } function DisclosureButton(props) { return