Files
openclaw/src/cli/command-path-matches.test.ts
kenners22 ffa6ebda4c fix(cli): protect protocol stdout during startup (#89997)
* fix(cli): suppress mcp serve startup stdout

* fix(cli): suppress mcp serve startup stdout

* fix(cli): protect protocol stdout during startup

* fix(cli): match ACP protocol options at startup

* fix(cli): derive protocol ownership from command action

---------

Co-authored-by: JARVIS <kenners22@users.noreply.github.com>
Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Vincent Koc <25068+vincentkoc@users.noreply.github.com>
2026-07-06 17:55:50 -07:00

13 lines
632 B
TypeScript

// Command path match tests cover CLI command path matching and normalization.
import { describe, expect, it } from "vitest";
import { matchesCommandPath } from "./command-path-matches.js";
describe("command-path-matches", () => {
it("matches prefix and exact command paths", () => {
expect(matchesCommandPath(["status"], ["status"])).toBe(true);
expect(matchesCommandPath(["status", "watch"], ["status"])).toBe(true);
expect(matchesCommandPath(["status", "watch"], ["status"], { exact: true })).toBe(false);
expect(matchesCommandPath(["config", "get"], ["config", "get"], { exact: true })).toBe(true);
});
});