> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# TestBot

> Interface exported by @botmesh/core/testing.

Defined in: [testing/createTestBot.ts:57](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/createTestBot.ts#L57)

What [createTestBot](https://botmesh.afaya.com.co/api/core/testing/functions/createTestBot.md) returns.

## Properties

### bot

```ts theme={null}
bot: Bot;
```

Defined in: [testing/createTestBot.ts:58](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/createTestBot.ts#L58)

***

### provider

```ts theme={null}
provider: MockProvider;
```

Defined in: [testing/createTestBot.ts:60](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/createTestBot.ts#L60)

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

***

### chat

```ts theme={null}
chat: TestChat;
```

Defined in: [testing/createTestBot.ts:62](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/createTestBot.ts#L62)

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

***

### chaos?

```ts theme={null}
chaos?: ChaosProvider<MockProvider>;
```

Defined in: [testing/createTestBot.ts:64](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/createTestBot.ts#L64)

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

## Methods

### dm()

```ts theme={null}
dm(userId, opts?): TestChat;
```

Defined in: [testing/createTestBot.ts:66](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/createTestBot.ts#L66)

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

#### Parameters

| Parameter | Type |
| - | - |
| `userId` | `string` |
| `opts?` | \{ `displayName?`: `string`; } |
| `opts.displayName?` | `string` |

#### Returns

[`TestChat`](https://botmesh.afaya.com.co/api/core/testing/interfaces/TestChat)

***

### group()

```ts theme={null}
group(groupId, opts?): TestChat;
```

Defined in: [testing/createTestBot.ts:68](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/createTestBot.ts#L68)

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

#### Parameters

| Parameter | Type |
| - | - |
| `groupId` | `string` |
| `opts?` | \{ `as?`: `string`; `displayName?`: `string`; } |
| `opts.as?` | `string` |
| `opts.displayName?` | `string` |

#### Returns

[`TestChat`](https://botmesh.afaya.com.co/api/core/testing/interfaces/TestChat)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.