test: tighten tui array assertions · openclaw/openclaw@0dffb94
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -60,7 +60,7 @@ describe("SearchableSelectList", () => {
|
60 | 60 | function expectNoMatchesForQuery(list: SearchableSelectList, query: string) { |
61 | 61 | typeInput(list, query); |
62 | 62 | const output = list.render(80); |
63 | | -expect(output).toEqual(expect.arrayContaining([expect.stringContaining("No matches")])); |
| 63 | +expect(output.some((line) => line.includes("No matches"))).toBe(true); |
64 | 64 | } |
65 | 65 | |
66 | 66 | function expectDescriptionVisibilityAtWidth(width: number, shouldContainDescription: boolean) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -71,9 +71,9 @@ describe("tui slash commands", () => {
|
71 | 71 | |
72 | 72 | it("includes gateway text commands", () => { |
73 | 73 | const commands = getSlashCommands({}); |
74 | | -expect(commands.map((command) => command.name)).toEqual( |
75 | | - expect.arrayContaining(["context", "commands"]), |
76 | | -); |
| 74 | +const names = commands.map((command) => command.name); |
| 75 | +expect(names).toContain("context"); |
| 76 | +expect(names).toContain("commands"); |
77 | 77 | }); |
78 | 78 | |
79 | 79 | it("includes /auth in local embedded mode", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。