From 2bf90e5a949a424dc91ef57e835bae8574d38f0f Mon Sep 17 00:00:00 2001 From: can1357 Date: Tue, 24 Feb 2026 03:37:47 +0100 Subject: [PATCH] fix: align task-template test expectations with trimmed prompt output optimizePromptLayout trims the rendered template, stripping the leading newlines from sectionSeparator. Tests now account for this. --- packages/coding-agent/test/tools/task-template.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/test/tools/task-template.test.ts b/packages/coding-agent/test/tools/task-template.test.ts index 8be56304b..8389b90f2 100644 --- a/packages/coding-agent/test/tools/task-template.test.ts +++ b/packages/coding-agent/test/tools/task-template.test.ts @@ -21,7 +21,7 @@ describe("renderTemplate", () => { assignment: "Full instructions for the agent.\nWith multiple lines.", }); expect(result.task).toContain("Shared constraints here"); - expect(result.task).toContain(sectionSeparator("Background")); + expect(result.task).toContain(sectionSeparator("Background").trimStart()); expect(result.task).toContain("Full instructions for the agent.\nWith multiple lines."); }); @@ -31,7 +31,7 @@ describe("renderTemplate", () => { description: "label", assignment: "the real work", }); - expect(result.task).toStartWith(`${sectionSeparator("Background")}\ncontext`); + expect(result.task).toStartWith(`${sectionSeparator("Background").trimStart()}\ncontext`); expect(result.task).toContain("the real work"); });