mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 13:20:45 +00:00
fix(cli): trim plugin preloads for setup-safe commands
This commit is contained in:
@@ -13,6 +13,7 @@ vi.mock("../../../globals.js", () => ({
|
||||
vi.mock("../../plugin-registry.js", () => ({
|
||||
ensurePluginRegistryLoaded: vi.fn(),
|
||||
}));
|
||||
const { ensurePluginRegistryLoaded } = await import("../../plugin-registry.js");
|
||||
|
||||
const hasHooksMock = vi.fn((_hookName: string) => false);
|
||||
const runGatewayStopMock = vi.fn(
|
||||
@@ -95,6 +96,7 @@ describe("runMessageAction", () => {
|
||||
it("calls exit(0) after successful message delivery", async () => {
|
||||
await runSendAction();
|
||||
|
||||
expect(ensurePluginRegistryLoaded).toHaveBeenCalledOnce();
|
||||
expect(exitMock).toHaveBeenCalledOnce();
|
||||
expect(exitMock).toHaveBeenCalledWith(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user