mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-16 03:31:10 +00:00
refactor(cli): normalize route boundaries
This commit is contained in:
@@ -29,6 +29,14 @@ describe("command-path-matches", () => {
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("treats structured rules without exact as prefix matches", () => {
|
||||
expect(
|
||||
matchesCommandPathRule(["plugins", "update", "now"], {
|
||||
pattern: ["plugins", "update"],
|
||||
}),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("matches any command path from a rule set", () => {
|
||||
expect(
|
||||
matchesAnyCommandPath(
|
||||
|
||||
Reference in New Issue
Block a user