test(wizard): mock migration detection in setup tests · openclaw/openclaw@17d02a6
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -89,6 +89,8 @@ const finalizeSetupWizard = vi.hoisted(() =>
|
89 | 89 | const listChannelPlugins = vi.hoisted(() => vi.fn(() => [])); |
90 | 90 | const logConfigUpdated = vi.hoisted(() => vi.fn(() => {})); |
91 | 91 | const setupInternalHooks = vi.hoisted(() => vi.fn(async (cfg) => cfg)); |
| 92 | +const detectSetupMigrationSources = vi.hoisted(() => vi.fn(async () => [])); |
| 93 | +const runSetupMigrationImport = vi.hoisted(() => vi.fn(async () => {})); |
92 | 94 | |
93 | 95 | const setupChannels = vi.hoisted(() => vi.fn(async (cfg) => cfg)); |
94 | 96 | const setupSkills = vi.hoisted(() => vi.fn(async (cfg) => cfg)); |
@@ -206,6 +208,11 @@ vi.mock("../commands/onboard-hooks.js", () => ({
|
206 | 208 | setupInternalHooks, |
207 | 209 | })); |
208 | 210 | |
| 211 | +vi.mock("./setup.migration-import.js", () => ({ |
| 212 | + detectSetupMigrationSources, |
| 213 | + runSetupMigrationImport, |
| 214 | +})); |
| 215 | + |
209 | 216 | vi.mock("../config/config.js", () => ({ |
210 | 217 | DEFAULT_GATEWAY_PORT: 18789, |
211 | 218 | createConfigIO, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。