
























@@ -4,6 +4,17 @@ import { asConfig, setupSecretsRuntimeSnapshotTestHooks } from "./runtime.test-s
4455const { prepareSecretsRuntimeSnapshot } = setupSecretsRuntimeSnapshotTestHooks();
667+function requireTelegramConfig(
8+snapshot: Awaited<ReturnType<typeof prepareSecretsRuntimeSnapshot>>,
9+) {
10+const config = snapshot.config.channels?.telegram;
11+expect(config).toBeDefined();
12+if (!config) {
13+throw new Error("expected Telegram runtime config");
14+}
15+return config;
16+}
17+718describe("secrets runtime snapshot inactive telegram surfaces", () => {
819it("skips inactive Telegram refs and emits diagnostics", async () => {
920const snapshot = await prepareSecretsRuntimeSnapshot({
@@ -29,7 +40,7 @@ describe("secrets runtime snapshot inactive telegram surfaces", () => {
2940loadablePluginOrigins: new Map(),
3041});
314232-expect(snapshot.config.channels?.telegram?.botToken).toEqual({
43+expect(requireTelegramConfig(snapshot).botToken).toEqual({
3344source: "env",
3445provider: "default",
3546id: "DISABLED_TELEGRAM_BASE_TOKEN",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。