























@@ -1,4 +1,5 @@
11import { beforeEach, describe, expect, it, vi } from "vitest";
2+import type { ChannelPlugin } from "../channels/plugins/types.plugin.js";
23import { baseConfigSnapshot, createTestRuntime } from "./test-runtime-config-helpers.js";
3445const mocks = vi.hoisted(() => ({
@@ -9,7 +10,7 @@ const mocks = vi.hoisted(() => ({
910diagnostics: [],
1011})),
1112loadAuthProfileStoreWithoutExternalProfiles: vi.fn(),
12-listReadOnlyChannelPluginsForConfig: vi.fn(() => []),
13+listReadOnlyChannelPluginsForConfig: vi.fn<() => ChannelPlugin[]>(() => []),
1314buildChannelAccountSnapshot: vi.fn(),
1415}));
1516@@ -93,9 +94,17 @@ describe("channels list auth profiles", () => {
9394mocks.listReadOnlyChannelPluginsForConfig.mockReturnValue([
9495{
9596id: "telegram",
96-meta: { id: "telegram", label: "Telegram" },
97+meta: {
98+id: "telegram",
99+label: "Telegram",
100+selectionLabel: "Telegram",
101+docsPath: "/channels/telegram",
102+blurb: "Telegram",
103+},
104+capabilities: { chatTypes: ["direct"] },
97105config: {
98106listAccountIds: () => ["alerts", "default"],
107+resolveAccount: () => ({}),
99108},
100109},
101110]);
@@ -134,9 +143,17 @@ describe("channels list auth profiles", () => {
134143mocks.listReadOnlyChannelPluginsForConfig.mockReturnValue([
135144{
136145id: "telegram",
137-meta: { id: "telegram", label: "Telegram" },
146+meta: {
147+id: "telegram",
148+label: "Telegram",
149+selectionLabel: "Telegram",
150+docsPath: "/channels/telegram",
151+blurb: "Telegram",
152+},
153+capabilities: { chatTypes: ["direct"] },
138154config: {
139155listAccountIds: () => ["default"],
156+resolveAccount: () => ({}),
140157},
141158},
142159]);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。