mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 20:44:32 +00:00
perf(cli): speed up help/config paths and route config get/unset
This commit is contained in:
13
src/cli/respawn-policy.test.ts
Normal file
13
src/cli/respawn-policy.test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { shouldSkipRespawnForArgv } from "./respawn-policy.js";
|
||||
|
||||
describe("shouldSkipRespawnForArgv", () => {
|
||||
it("skips respawn for help/version calls", () => {
|
||||
expect(shouldSkipRespawnForArgv(["node", "openclaw", "--help"])).toBe(true);
|
||||
expect(shouldSkipRespawnForArgv(["node", "openclaw", "-V"])).toBe(true);
|
||||
});
|
||||
|
||||
it("keeps respawn path for normal commands", () => {
|
||||
expect(shouldSkipRespawnForArgv(["node", "openclaw", "status"])).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user