mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:40:44 +00:00
test(wizard): mock migration detection in setup tests
This commit is contained in:
@@ -89,6 +89,8 @@ const finalizeSetupWizard = vi.hoisted(() =>
|
||||
const listChannelPlugins = vi.hoisted(() => vi.fn(() => []));
|
||||
const logConfigUpdated = vi.hoisted(() => vi.fn(() => {}));
|
||||
const setupInternalHooks = vi.hoisted(() => vi.fn(async (cfg) => cfg));
|
||||
const detectSetupMigrationSources = vi.hoisted(() => vi.fn(async () => []));
|
||||
const runSetupMigrationImport = vi.hoisted(() => vi.fn(async () => {}));
|
||||
|
||||
const setupChannels = vi.hoisted(() => vi.fn(async (cfg) => cfg));
|
||||
const setupSkills = vi.hoisted(() => vi.fn(async (cfg) => cfg));
|
||||
@@ -206,6 +208,11 @@ vi.mock("../commands/onboard-hooks.js", () => ({
|
||||
setupInternalHooks,
|
||||
}));
|
||||
|
||||
vi.mock("./setup.migration-import.js", () => ({
|
||||
detectSetupMigrationSources,
|
||||
runSetupMigrationImport,
|
||||
}));
|
||||
|
||||
vi.mock("../config/config.js", () => ({
|
||||
DEFAULT_GATEWAY_PORT: 18789,
|
||||
createConfigIO,
|
||||
|
||||
Reference in New Issue
Block a user