From 1002b5bc7017c03e43117b89c76b5e5bc566e34f Mon Sep 17 00:00:00 2001 From: HAMZA BHULLA <138264542+hamzabhulla@users.noreply.github.com> Date: Sat, 24 Oct 2026 14:59:39 +0500 Subject: [PATCH] test(cli): account for archived agent list ordering Co-authored-by: HAMZA BHULLA <138264542+hamzabhulla@users.noreply.github.com> --- packages/cli/src/commands/agent/ls.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/commands/agent/ls.test.ts b/packages/cli/src/commands/agent/ls.test.ts index 499af90e74..53b797a3d2 100644 --- a/packages/cli/src/commands/agent/ls.test.ts +++ b/packages/cli/src/commands/agent/ls.test.ts @@ -139,8 +139,8 @@ describe("runLsCommand", () => { expect( result.data.map(({ name, archived, archivedAt }) => ({ name, archived, archivedAt })), ).toEqual([ - { name: "agent 3", archived: false, archivedAt: null }, { name: "agent 2", archived: true, archivedAt: "2026-10-10T00:00:00.000Z" }, + { name: "agent 3", archived: false, archivedAt: null }, { name: "agent 1", archived: false, archivedAt: null }, ]); @@ -150,8 +150,8 @@ describe("runLsCommand", () => { if (!archivedColumn || typeof archivedColumn.field !== "function") { throw new Error("Expected the ARCHIVED column to have a display accessor"); } - expect(result.data[1]!.status).toBe("idle"); - expect(archivedColumn.field(result.data[1]!)).toBe("yes"); - expect(archivedColumn.field(result.data[0]!)).toBe("-"); + expect(result.data[0]!.status).toBe("idle"); + expect(archivedColumn.field(result.data[0]!)).toBe("yes"); + expect(archivedColumn.field(result.data[1]!)).toBe("-"); }); });