provider in a ChaosProvider.
Type Parameters
Parameters
Returns
ChaosProvider<P>
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Function exported by @botmesh/core/testing.
function withChaos<P>(provider, options?): ChaosProvider<P>;
provider in a ChaosProvider.
| Type Parameter |
|---|
P extends IProvider<unknown> |
| Parameter | Type |
|---|---|
provider | P |
options? | ChaosOptions |
ChaosProvider<P>
const mock = new MockProvider()
const chaos = withChaos(mock, { seed: 3, duplicates: 1 })
const bot = new Bot({ provider: chaos })
mock.incoming('hola') // delivered twice; the Bot's inbound dedupe drops the copy