fix(ci): repair security and route test fixtures

This commit is contained in:
Peter Steinberger
2026-03-15 19:53:51 -07:00
parent 65ec4843e8
commit 3f12e90f3e
3 changed files with 20 additions and 4 deletions

View File

@@ -32,9 +32,12 @@ describe("program routes", () => {
await expect(route?.run(argv)).resolves.toBe(false);
}
it("matches status route and always preloads plugins", () => {
it("matches status route and preloads plugins only for text output", () => {
const route = expectRoute(["status"]);
expect(route?.loadPlugins).toBe(true);
expect(typeof route?.loadPlugins).toBe("function");
const shouldLoad = route?.loadPlugins as (argv: string[]) => boolean;
expect(shouldLoad(["node", "openclaw", "status"])).toBe(true);
expect(shouldLoad(["node", "openclaw", "status", "--json"])).toBe(false);
});
it("matches health route and preloads plugins only for text output", () => {