test: share doctor stale plugin fixture

This commit is contained in:
Peter Steinberger
2026-04-19 02:39:18 +01:00
parent a4ac25972b
commit b7d362ddbb

View File

@@ -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",
});