test(wizard): mock migration detection in setup tests

This commit is contained in:
Peter Steinberger
2026-05-02 11:45:14 +01:00
parent 2b88dc0714
commit 17d02a6a73

View File

@@ -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,