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.
This commit is contained in:
can1357
2026-02-24 03:37:47 +01:00
parent 5b867435e6
commit 2bf90e5a94
@@ -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");
});