test: clarify plugin loader channel assertions · openclaw/openclaw@b38c78f
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -283,7 +283,7 @@ function setupBundledTelegramPlugin() {
|
283 | 283 | function expectTelegramLoaded(registry: ReturnType<typeof loadOpenClawPlugins>) { |
284 | 284 | const telegram = registry.plugins.find((entry) => entry.id === "telegram"); |
285 | 285 | expect(telegram?.status).toBe("loaded"); |
286 | | -expect(registry.channels.some((entry) => entry.plugin.id === "telegram")).toBe(true); |
| 286 | +expect(registry.channels.map((entry) => entry.plugin.id)).toContain("telegram"); |
287 | 287 | } |
288 | 288 | |
289 | 289 | function loadRegistryFromSinglePlugin(params: { |
@@ -4588,9 +4588,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
|
4588 | 4588 | expect(registry.plugins.find((entry) => entry.id === "nested-default-channel")?.status).toBe( |
4589 | 4589 | "loaded", |
4590 | 4590 | ); |
4591 | | -expect(registry.channels.some((entry) => entry.plugin.id === "nested-default-channel")).toBe( |
4592 | | -true, |
4593 | | -); |
| 4591 | +expect(registry.channels.map((entry) => entry.plugin.id)).toContain("nested-default-channel"); |
4594 | 4592 | }); |
4595 | 4593 | |
4596 | 4594 | it("does not treat manifest channel ids as scoped plugin id matches", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。