build: color-code open and close outputs

This commit is contained in:
2026-03-21 01:05:17 +05:30
parent 17bb1130c8
commit 787fa75df4
6 changed files with 64 additions and 67 deletions
+4 -4
View File
@@ -98,7 +98,7 @@ describe("closeMultiModel", () => {
expect(result.worktreesRemoved).toEqual([worktreePath]);
expect(result.branchesDeleted).toEqual(["opencode/test-session/model"]);
expect(result.tagsCreated?.length).toBe(1);
expect(result.warnings).toEqual([]);
// Ensure removal commands were executed
expect(executedCommands).toContain(`git worktree remove -f ${worktreePath}`);
expect(executedCommands).toContain(`git branch -D opencode/test-session/model`);
@@ -153,7 +153,7 @@ describe("closeMultiModel", () => {
expect(result.worktreesRemoved).toEqual([worktreePath]);
expect(result.branchesDeleted).toEqual(["opencode/test-session/model"]);
expect(result.tagsCreated?.length).toBe(1);
expect(result.warnings).toEqual([]);
// Verify the expected git commands were executed
expect(executedCommands).toContain(`git worktree remove -f ${worktreePath}`);
@@ -183,8 +183,8 @@ describe("closeMultiModel", () => {
global.Date = OriginalDate;
expect(result.success).toBe(true);
expect(result.warnings?.length).toBe(1);
expect(result.warnings?.[0]).toContain("Failed to create tag");
// Expect the warning message to be captured in instructions
expect(result.instructions?.some(msg => msg.includes('Failed to create tag'))).toBe(true);
expect(result.tagsCreated).toEqual([]);
});