Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion test/unit/review-effort.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});
Expand Down Expand Up @@ -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 });
});
});