From e62431fd7f59c2486c116dc0c52e018bca3c8062 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 23 Apr 2026 06:07:35 +0100 Subject: [PATCH] test: type onboarding plugin enable mock --- src/commands/onboarding-plugin-install.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/onboarding-plugin-install.test.ts b/src/commands/onboarding-plugin-install.test.ts index 6282d1420c8..316bbfdbd55 100644 --- a/src/commands/onboarding-plugin-install.test.ts +++ b/src/commands/onboarding-plugin-install.test.ts @@ -1,6 +1,8 @@ import fs from "node:fs/promises"; import path from "node:path"; import { beforeEach, describe, expect, it, vi } from "vitest"; +import type { OpenClawConfig } from "../config/types.openclaw.js"; +import type { PluginEnableResult } from "../plugins/enable.js"; import { withTempDir } from "../test-helpers/temp-dir.js"; const resolveBundledInstallPlanForCatalogEntry = vi.hoisted(() => vi.fn(() => undefined)); @@ -20,7 +22,9 @@ vi.mock("../plugins/install.js", () => ({ installPluginFromNpmSpec, })); -const enablePluginInConfig = vi.hoisted(() => vi.fn((cfg) => ({ config: cfg, enabled: true }))); +const enablePluginInConfig = vi.hoisted(() => + vi.fn((cfg: OpenClawConfig): PluginEnableResult => ({ config: cfg, enabled: true })), +); vi.mock("../plugins/enable.js", () => ({ enablePluginInConfig, }));