import { describe, it, expect } from "vitest" import { render } from "@testing-library/react" import { RichFileTree } from "./rich-file-tree" describe("RichFileTree", () => { it("renders without crashing given a flat path list", () => { const { container } = render( , ) // Pierre renders into a custom element / shadow root; we can't peek // inside shadow DOM from RTL, but we can confirm the host mounted. expect(container.querySelectorAll("*").length).toBeGreaterThan(0) }) it("flattens a recursive FileNode tree to paths", () => { const { container } = render( , ) expect(container.querySelectorAll("*").length).toBeGreaterThan(0) }) it("throws when both root and paths are passed", () => { expect(() => render(), ).toThrow(/root.*paths.*not both/i) }) })