Skip to main content

Call Signature

Defined in: testing/createTestBot.ts:90 Starts a Bot on a MockProvider: no network and no phone. Resolves to the bot, the provider and chat helpers that send inbound messages and check the replies. options.chaos wraps the provider in a ChaosProvider.

Parameters

Returns

Promise<TestBot>

Example

Call Signature

Defined in: testing/createTestBot.ts:91 Starts a Bot on a MockProvider: no network and no phone. Resolves to the bot, the provider and chat helpers that send inbound messages and check the replies. options.chaos wraps the provider in a ChaosProvider.

Parameters

Returns

Promise<TestBot & object>

Example

Call Signature

Defined in: testing/createTestBot.ts:111 Test the bot a defineBot factory builds: the factory is called with the MockProvider (or its chaos wrapper) and the bot it returns is started.

Parameters

Returns

Promise<TestBot>

Example

Throws

when the factory does not return a Bot built around the provider it was given.

Call Signature

Defined in: testing/createTestBot.ts:112 Starts a Bot on a MockProvider: no network and no phone. Resolves to the bot, the provider and chat helpers that send inbound messages and check the replies. options.chaos wraps the provider in a ChaosProvider.

Parameters

Returns

Promise<TestBot & object>

Example