From 53fd9c8108111f57e5fd55c9f9aba5fe02f3887c Mon Sep 17 00:00:00 2001 From: luciferlive112116 <291889058+luciferlive112116@users.noreply.github.com> Date: Mon, 6 Jul 2026 15:22:09 +0800 Subject: [PATCH] test(review): lock in changed-files summary collapsible render (#2145) Co-authored-by: Cursor --- test/unit/changed-files-summary-collapsible.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/unit/changed-files-summary-collapsible.test.ts b/test/unit/changed-files-summary-collapsible.test.ts index b752097efc..07201579e0 100644 --- a/test/unit/changed-files-summary-collapsible.test.ts +++ b/test/unit/changed-files-summary-collapsible.test.ts @@ -28,7 +28,7 @@ const files: ChangedFileSummaryInput[] = [ { path: "package-lock.json", additions: 100, deletions: 50 }, ]; -describe("buildChangedFilesSummaryCollapsible", () => { +describe("buildChangedFilesSummaryCollapsible (#2145)", () => { it("groups changed files by category with file counts and +/- totals", () => { const c = buildChangedFilesSummaryCollapsible(files); expect(c).not.toBeNull(); @@ -69,7 +69,7 @@ describe("buildChangedFilesSummaryCollapsible", () => { }); }); -describe("buildUnifiedCommentBody changedFilesSummary wiring (#1957)", () => { +describe("buildUnifiedCommentBody changedFilesSummary wiring (#1957 / #2145)", () => { const base = { gate: gate(), panelRows, @@ -82,6 +82,7 @@ describe("buildUnifiedCommentBody changedFilesSummary wiring (#1957)", () => { const body = buildUnifiedCommentBody({ ...base, changedFilesSummary: files }); expect(body).toContain("Changed files"); expect(body).toContain("| Source | 2 | +45 | -10 |"); + expect(body).toMatch(/
Changed files<\/b><\/summary>/); }); it("does NOT add a Changed files section when changedFilesSummary is absent (flag-OFF parity)", () => {