MCPcopy Create free account
hub / github.com/clawbot7/cli-gateway / createFakeBot

Function createFakeBot

test/telegramSink.test.ts:6–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { createTelegramSink } from '../src/channels/telegramSink.js';
5
6function createFakeBot() {
7 const calls: any[] = [];
8
9 const bot = {
10 api: {
11 sendMessage: async (...args: any[]) => {
12 calls.push({ method: 'sendMessage', args });
13 return { message_id: calls.length };
14 },
15 editMessageText: async (...args: any[]) => {
16 calls.push({ method: 'editMessageText', args });
17 },
18 },
19 } as any;
20
21 return { bot, calls };
22}
23
24test('telegram sink renders permission with inline keyboard + HTML', async () => {
25 const { bot, calls } = createFakeBot();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected