import { ThreadId } from "@t3tools/contracts"; import { renderToStaticMarkup } from "react-dom/server"; import { describe, expect, it } from "vite-plus/test"; import { ThreadWorktreeIndicator } from "./ThreadStatusIndicators"; describe("ThreadWorktreeIndicator", () => { it("renders the worktree folder and branch in an accessible label", () => { const markup = renderToStaticMarkup( , ); expect(markup).toContain('role="img"'); expect(markup).toContain( 'aria-label="Worktree: sidebar-indicator (feature/sidebar-indicator)"', ); expect(markup).toContain('data-testid="thread-worktree-thread-1"'); }); it.each([null, "", " "])("renders nothing for an absent worktree path", (worktreePath) => { const markup = renderToStaticMarkup( , ); expect(markup).toBe(""); }); });