diff --git a/src/commands/doctor/shared/missing-configured-plugin-install.test.ts b/src/commands/doctor/shared/missing-configured-plugin-install.test.ts index bc53e6b8eca..7f7ebff28e6 100644 --- a/src/commands/doctor/shared/missing-configured-plugin-install.test.ts +++ b/src/commands/doctor/shared/missing-configured-plugin-install.test.ts @@ -3,7 +3,10 @@ import os from "node:os"; import path from "node:path"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { resolveRegistryUpdateChannel } from "../../../infra/update-channels.js"; -import { resolveNpmInstallSpecsForUpdateChannel } from "../../../plugins/install-channel-specs.js"; +import { + resolveClawHubInstallSpecsForUpdateChannel, + resolveNpmInstallSpecsForUpdateChannel, +} from "../../../plugins/install-channel-specs.js"; import { VERSION } from "../../../version.js"; function expectedNpmInstallSpec(spec: string): string { @@ -13,6 +16,13 @@ function expectedNpmInstallSpec(spec: string): string { }).installSpec; } +function expectedClawHubInstallSpec(spec: string): string { + return resolveClawHubInstallSpecsForUpdateChannel({ + spec, + updateChannel: resolveRegistryUpdateChannel({ currentVersion: VERSION }), + }).installSpec; +} + function expectRecordFields(record: unknown, expected: Record) { if (!record || typeof record !== "object") { throw new Error("Expected record"); @@ -1264,7 +1274,7 @@ describe("repairMissingConfiguredPluginInstalls", () => { }); expectRecordFields(mockCallArg(mocks.installPluginFromClawHub), { - spec: "clawhub:@openclaw/whatsapp", + spec: expectedClawHubInstallSpec("clawhub:@openclaw/whatsapp"), env: { OPENCLAW_COMPATIBILITY_HOST_VERSION: "2026.5.19", OPENCLAW_UPDATE_POST_CORE_CONVERGENCE: "1",