test(channels): avoid catalog scan in command account tests · openclaw/openclaw@926a5a8
steipete
·
2026-05-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,11 +15,16 @@ import { baseConfigSnapshot, createTestRuntime } from "./test-runtime-config-hel
|
15 | 15 | const runtime = createTestRuntime(); |
16 | 16 | let minimalChannelsCommandRegistry: ReturnType<typeof createTestRegistry>; |
17 | 17 | const createClackPrompterMock = vi.hoisted(() => vi.fn()); |
| 18 | +const catalogMocks = vi.hoisted(() => ({ |
| 19 | +listTrustedChannelPluginCatalogEntries: vi.fn(() => []), |
| 20 | +})); |
18 | 21 | |
19 | 22 | vi.mock("../wizard/clack-prompter.js", () => ({ |
20 | 23 | createClackPrompter: createClackPrompterMock, |
21 | 24 | })); |
22 | 25 | |
| 26 | +vi.mock("./channel-setup/trusted-catalog.js", () => catalogMocks); |
| 27 | + |
23 | 28 | type ChannelSectionConfig = { |
24 | 29 | enabled?: boolean; |
25 | 30 | name?: string; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。