























@@ -80,6 +80,18 @@ function createIndex(plugins: readonly PluginManifestRecord[]): PluginRegistrySn
8080};
8181}
828283+const indexDiagnostic = {
84+level: "warn",
85+source: "/plugins/demo/openclaw.plugin.json",
86+message: "indexed warning",
87+} as const;
88+89+const manifestDiagnostic = {
90+level: "warn",
91+source: "/plugins/demo/openclaw.plugin.json",
92+message: "manifest warning",
93+} as const;
94+8395describe("loadPluginLookUpTable", () => {
8496beforeEach(() => {
8597listPotentialConfiguredChannelIds
@@ -105,10 +117,13 @@ describe("loadPluginLookUpTable", () => {
105117},
106118}),
107119];
108-const index = createIndex(plugins);
120+const index = {
121+ ...createIndex(plugins),
122+diagnostics: [indexDiagnostic],
123+};
109124const manifestRegistry: PluginManifestRegistry = {
110125 plugins,
111-diagnostics: [],
126+diagnostics: [indexDiagnostic, manifestDiagnostic],
112127};
113128loadPluginManifestRegistryForInstalledIndex.mockReturnValue(manifestRegistry);
114129const { loadPluginLookUpTable } = await import("./plugin-lookup-table.js");
@@ -127,6 +142,7 @@ describe("loadPluginLookUpTable", () => {
127142});
128143129144expect(table.manifestRegistry).toBe(manifestRegistry);
145+expect(table.diagnostics).toEqual([indexDiagnostic, manifestDiagnostic]);
130146expect(table.byPluginId.get("telegram")?.id).toBe("telegram");
131147expect(table.normalizePluginId("openai-codex")).toBe("openai");
132148expect(table.owners.channels.get("telegram")).toEqual(["telegram"]);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。