diff --git a/src/components/bookmarks/group.test.jsx b/src/components/bookmarks/group.test.jsx new file mode 100644 index 000000000..6548a5127 --- /dev/null +++ b/src/components/bookmarks/group.test.jsx @@ -0,0 +1,86 @@ +// @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