> ## 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.

# recordEvents()

> Function exported by @botmesh/core/testing.

```ts theme={null}
function recordEvents(provider): EventRecorder;
```

Defined in: [testing/identityContract.ts:323](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/identityContract.ts#L323)

Subscribe to `provider.onEvent` and keep everything it emits — handy to feed
[assertStableIdentity](https://botmesh.afaya.com.co/api/core/testing/functions/assertStableIdentity.md) from a provider suite that drives `ingest()`
or a fake socket.

## Parameters

| Parameter | Type |
| - | - |
| `provider` | `Pick`\<[`IProvider`](https://botmesh.afaya.com.co/api/core/interfaces/IProvider), `"onEvent"`> |

## Returns

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


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