From b7d362ddbb851b2bdfcb21db4561bbe8ad062ce1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 19 Apr 2026 02:39:18 +0100 Subject: [PATCH] test: share doctor stale plugin fixture --- .../doctor/shared/preview-warnings.test.ts | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) 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", });