test: tighten tui array assertions

This commit is contained in:
Peter Steinberger
2026-05-09 21:57:27 +01:00
parent 4c6f3bc07e
commit 0dffb94644
2 changed files with 4 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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", () => {