diff --git a/src/commands/doctor/shared/preview-warnings.test.ts b/src/commands/doctor/shared/preview-warnings.test.ts index d7a092ce463..03be7a4bd0f 100644 --- a/src/commands/doctor/shared/preview-warnings.test.ts +++ b/src/commands/doctor/shared/preview-warnings.test.ts @@ -151,6 +151,17 @@ function channelManifest(id: string, channelId: string): TestManifestRecord { }; } +function stalePluginConfig(id = "acpx") { + return { + plugins: { + allow: [id], + entries: { + [id]: { enabled: true }, + }, + }, + }; +} + describe("doctor preview warnings", () => { beforeEach(() => { manifestState.plugins = [manifest("discord")]; @@ -212,14 +223,7 @@ describe("doctor preview warnings", () => { it("includes stale plugin config warnings", async () => { const warnings = await collectDoctorPreviewWarnings({ - cfg: { - plugins: { - allow: ["acpx"], - entries: { - acpx: { enabled: true }, - }, - }, - }, + cfg: stalePluginConfig(), doctorFixCommand: "openclaw doctor --fix", }); @@ -260,14 +264,7 @@ describe("doctor preview warnings", () => { ]; const warnings = await collectDoctorPreviewWarnings({ - cfg: { - plugins: { - allow: ["acpx"], - entries: { - acpx: { enabled: true }, - }, - }, - }, + cfg: stalePluginConfig(), doctorFixCommand: "openclaw doctor --fix", });