diff --git a/src/__tests__/batcher.test.ts b/src/__tests__/batcher.test.ts index a04fecf..298c18a 100644 --- a/src/__tests__/batcher.test.ts +++ b/src/__tests__/batcher.test.ts @@ -27,7 +27,7 @@ describe('MessageBatcher', () => { ]; for (const msg of messages) { - await batcher.queueMessage(msg.text, msg.level); + batcher.queueMessage(msg.text, msg.level); } jest.advanceTimersByTime(1000); diff --git a/src/index.ts b/src/index.ts index abb9942..e0c9a80 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,3 @@ -// import fetch from 'node-fetch'; - export * from './types'; export { TelegramProcessor } from './processors/telegram'; @@ -24,27 +22,3 @@ export type { MessageProcessor, IMessageBatcher, } from './types'; - -// declare module '0xalice-tgram-bot' { -// export class MessageBatcher { -// static create( -// processors: any[], -// config: { -// maxBatchSize: number; -// maxWaitMs: number; -// } -// ): MessageBatcher; - -// queueMessage(message: string, level: 'info' | 'warning' | 'error'): void; -// flush(): Promise; -// destroy(): void; -// } - -// export class TelegramProcessor { -// constructor(config: { -// botToken: string; -// chatId: string; -// development?: boolean; -// }); -// } -// }