@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface TestBot

    What createTestBot returns.

    interface TestBot {
        bot: Bot;
        provider: MockProvider;
        chat: TestChat;
        chaos?: ChaosProvider<MockProvider>;
        dm(userId: string, opts?: { displayName?: string }): TestChat;
        group(
            groupId: string,
            opts?: { as?: string; displayName?: string },
        ): TestChat;
    }
    Index
    bot: Bot
    provider: MockProvider

    The MockProvider (drive inbound traffic and read outbox / journal here).

    chat: TestChat

    The default DM (user@s.whatsapp.net).

    The chaos wrapper the bot talks to — present only when options.chaos was given.

    • Another DM chat (chatId === senderId === userId).

      Parameters

      • userId: string
      • Optionalopts: { displayName?: string }

      Returns TestChat

    • A group chat driven by participant as (default 'user@s.whatsapp.net'); chat.as(other) adds participants.

      Parameters

      • groupId: string
      • Optionalopts: { as?: string; displayName?: string }

      Returns TestChat