


























@@ -38,6 +38,17 @@ const hoisted = vi.hoisted(() => ({
3838})),
3939}));
404041+function splitSetupEntriesForMock(raw: string): string[] {
42+const entries: string[] = [];
43+for (const entry of raw.split(",")) {
44+const normalized = entry.trim();
45+if (normalized.length > 0) {
46+entries.push(normalized);
47+}
48+}
49+return entries;
50+}
51+4152vi.mock("./login.js", () => ({
4253loginWeb: hoisted.loginWeb,
4354}));
@@ -70,11 +81,7 @@ vi.mock("openclaw/plugin-sdk/setup", async () => {
7081},
7182 normalizeE164,
7283pathExists: hoisted.pathExists,
73-splitSetupEntries: (raw: string) =>
74-raw
75-.split(",")
76-.map((entry) => entry.trim())
77-.filter(Boolean),
84+splitSetupEntries: splitSetupEntriesForMock,
7885setSetupChannelEnabled: (cfg: OpenClawConfig, channel: string, enabled: boolean) => ({
7986 ...cfg,
8087channels: {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。