From 769a09842d781ea692008a7ab53b128621b3e4b2 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 17 Apr 2026 07:20:36 +0100 Subject: [PATCH] test: narrow channels command test imports --- ....adds-non-default-telegram-account.test.ts | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/commands/channels.adds-non-default-telegram-account.test.ts b/src/commands/channels.adds-non-default-telegram-account.test.ts index 607035ce374..223390579ed 100644 --- a/src/commands/channels.adds-non-default-telegram-account.test.ts +++ b/src/commands/channels.adds-non-default-telegram-account.test.ts @@ -13,22 +13,14 @@ const authMocks = vi.hoisted(() => ({ loadAuthProfileStore: vi.fn(), })); -vi.mock("../agents/auth-profiles.js", async () => { - const actual = await vi.importActual( - "../agents/auth-profiles.js", - ); - return { - ...actual, - loadAuthProfileStore: authMocks.loadAuthProfileStore, - }; -}); +vi.mock("../agents/auth-profiles.js", () => ({ + loadAuthProfileStore: authMocks.loadAuthProfileStore, +})); -import { - channelsAddCommand, - channelsListCommand, - channelsRemoveCommand, - formatGatewayChannelsStatusLines, -} from "./channels.js"; +import { channelsAddCommand } from "./channels/add.js"; +import { channelsListCommand } from "./channels/list.js"; +import { channelsRemoveCommand } from "./channels/remove.js"; +import { formatGatewayChannelsStatusLines } from "./channels/status.js"; const runtime = createTestRuntime(); let clackPrompterModule: typeof import("../wizard/clack-prompter.js");