Open History to see the last commit
1import { renderToStaticMarkup } from "react-dom/server";
2import { describe, expect, it, vi } from "vite-plus/test";
3
4import { ComposerPendingReviewComments } from "./ComposerPendingReviewComments";
5
6describe("ComposerPendingReviewComments", () => {
7 it("keeps an empty-note chip visible without an empty tooltip", () => {
8 const markup = renderToStaticMarkup(
9 <ComposerPendingReviewComments
10 comments={[
11 {
12 id: "selection-1",
13 sectionId: "pull-request:42",
14 sectionTitle: "PR #42",
15 filePath: "src/app.ts",
16 startIndex: 3,
17 endIndex: 5,
18 rangeLabel: "L4-L6",
19 text: "",
20 diff: "+const answer = 42;",
21 },
22 ]}
23 onRemove={vi.fn()}
24 />,
25 );
26
27 expect(markup).toContain("src/app.ts L4-L6");
28 expect(markup).not.toContain('data-slot="tooltip-trigger"');
29 });
30});