






















@@ -57,8 +57,16 @@ describe("compaction identifier-preservation instructions", () => {
5757});
5858}
595960+function summaryCall(index: number): unknown[] | undefined {
61+return mockGenerateSummary.mock.calls[index];
62+}
63+64+function latestSummaryCall(): unknown[] | undefined {
65+return mockGenerateSummary.mock.calls[mockGenerateSummary.mock.calls.length - 1];
66+}
67+6068function firstSummaryInstructions() {
61-return extractSummaryInstructions(mockGenerateSummary.mock.calls.at(0));
69+return extractSummaryInstructions(summaryCall(0));
6270}
63716472it("injects identifier-preservation guidance even without custom instructions", async () => {
@@ -112,7 +120,7 @@ describe("compaction identifier-preservation instructions", () => {
112120});
113121114122expect(mockGenerateSummary).toHaveBeenCalledTimes(3);
115-const mergedCall = mockGenerateSummary.mock.calls.at(-1);
123+const mergedCall = latestSummaryCall();
116124const instructions = extractSummaryInstructions(mergedCall);
117125expect(instructions).toContain("Merge these partial summaries into a single cohesive summary.");
118126expect(instructions).toContain("Prioritize customer-visible regressions.");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。