From 08f8a8cfb8b08f7b98adade7aae7f2002650d274 Mon Sep 17 00:00:00 2001 From: luciferlive112116 <291889058+luciferlive112116@users.noreply.github.com> Date: Mon, 6 Jul 2026 17:35:47 +0800 Subject: [PATCH] test(review): add multi-file band-5 case for estimateReviewEffort (#2151) Co-authored-by: Cursor --- test/unit/review-effort.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/unit/review-effort.test.ts b/test/unit/review-effort.test.ts index c37b02d52b..2bf21f3024 100644 --- a/test/unit/review-effort.test.ts +++ b/test/unit/review-effort.test.ts @@ -10,7 +10,7 @@ function file(path: string, added: number): ReviewEffortFile { return { path, patch: srcPatch(added) }; } -describe("estimateReviewEffort", () => { +describe("estimateReviewEffort (#2151)", () => { it("returns band 1 and a floored minute for an empty change set", () => { expect(estimateReviewEffort([])).toEqual({ band: 1, minutes: 1 }); }); @@ -49,4 +49,10 @@ describe("estimateReviewEffort", () => { expect(effort.band).toBe(2); expect(effort.minutes).toBe(13); }); + + it("maps a multi-file change above the band-4 ceiling to band 5 (#2151)", () => { + // BAND_MAX top tier is 300; 5×100 source lines + 5×3 per-file overhead = 515 → band 5 + const files = Array.from({ length: 5 }, (_, i) => file(`src/pkg${i}/mod.ts`, 100)); + expect(estimateReviewEffort(files)).toEqual({ band: 5, minutes: 258 }); + }); });