From 0dffb94644af7ec69187ef034c62ab41c2a40a37 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 9 May 2026 21:57:27 +0100 Subject: [PATCH] test: tighten tui array assertions --- src/tui/components/searchable-select-list.test.ts | 2 +- src/tui/tui.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tui/components/searchable-select-list.test.ts b/src/tui/components/searchable-select-list.test.ts index 7e6011f4d08..f5f5234c990 100644 --- a/src/tui/components/searchable-select-list.test.ts +++ b/src/tui/components/searchable-select-list.test.ts @@ -60,7 +60,7 @@ describe("SearchableSelectList", () => { function expectNoMatchesForQuery(list: SearchableSelectList, query: string) { typeInput(list, query); const output = list.render(80); - expect(output).toEqual(expect.arrayContaining([expect.stringContaining("No matches")])); + expect(output.some((line) => line.includes("No matches"))).toBe(true); } function expectDescriptionVisibilityAtWidth(width: number, shouldContainDescription: boolean) { diff --git a/src/tui/tui.test.ts b/src/tui/tui.test.ts index 4c971a81862..d11de6c7b32 100644 --- a/src/tui/tui.test.ts +++ b/src/tui/tui.test.ts @@ -71,9 +71,9 @@ describe("tui slash commands", () => { it("includes gateway text commands", () => { const commands = getSlashCommands({}); - expect(commands.map((command) => command.name)).toEqual( - expect.arrayContaining(["context", "commands"]), - ); + const names = commands.map((command) => command.name); + expect(names).toContain("context"); + expect(names).toContain("commands"); }); it("includes /auth in local embedded mode", () => {