From 38bdb0d271e2894a1a6ce1efeb01d825e99f7f17 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 2 Mar 2026 14:14:02 +0000 Subject: [PATCH] test(perf): prune redundant preaction command-path cases --- src/cli/program/preaction.test.ts | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/cli/program/preaction.test.ts b/src/cli/program/preaction.test.ts index c66d2b7ed16..30987fff154 100644 --- a/src/cli/program/preaction.test.ts +++ b/src/cli/program/preaction.test.ts @@ -157,28 +157,9 @@ describe("registerPreActionHooks", () => { commandPath: ["message", "send"], }); expect(ensurePluginRegistryLoadedMock).toHaveBeenCalledTimes(1); - vi.clearAllMocks(); - - await runPreAction({ - parseArgv: ["configure"], - processArgv: ["node", "openclaw", "configure"], - }); - - expect(ensureConfigReadyMock).toHaveBeenCalledWith({ - runtime: runtimeMock, - commandPath: ["configure"], - }); - expect(ensurePluginRegistryLoadedMock).toHaveBeenCalledTimes(1); }); - it("skips preaction work for doctor and help/version argv", async () => { - await runPreAction({ - parseArgv: ["doctor"], - processArgv: ["node", "openclaw", "doctor"], - }); - - expect(ensureConfigReadyMock).not.toHaveBeenCalled(); - vi.clearAllMocks(); + it("skips preaction work when argv indicates help/version", async () => { await runPreAction({ parseArgv: ["status"], processArgv: ["node", "openclaw", "--version"],