mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 13:00:44 +00:00
test: tighten tui array assertions
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user