test: align telegram cron test doubles · openclaw/openclaw@80f4c93
steipete
·
2026-04-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -135,7 +135,7 @@ function createTelegramCommandTestPlugin(): ChannelPlugin {
|
135 | 135 | accountId?: string | null, |
136 | 136 | ) => resolveScopedAccount(cfg, "telegram", accountId) as { botToken?: string }; |
137 | 137 | |
138 | | -return createScopedCommandTestPlugin({ |
| 138 | +const plugin = createScopedCommandTestPlugin({ |
139 | 139 | id: "telegram", |
140 | 140 | label: "Telegram", |
141 | 141 | buildPatch: ({ token }) => (token ? { botToken: token } : {}), |
@@ -195,6 +195,14 @@ function createTelegramCommandTestPlugin(): ChannelPlugin {
|
195 | 195 | return issues; |
196 | 196 | }), |
197 | 197 | }); |
| 198 | +return { |
| 199 | + ...plugin, |
| 200 | +setup: { |
| 201 | + ...plugin.setup!, |
| 202 | +namedAccountPromotionKeys: ["botToken", "tokenFile"], |
| 203 | +singleAccountKeysToMove: ["streaming"], |
| 204 | +}, |
| 205 | +}; |
198 | 206 | } |
199 | 207 | |
200 | 208 | function createMinimalChannelsCommandRegistryForTests(): ReturnType<typeof createTestRegistry> { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。