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

# assertStableIdentity()

> Function exported by @botmesh/core/testing.

```ts theme={null}
function assertStableIdentity(
   events, 
   expectations?, 
   options?
): void;
```

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

Throw an [IdentityContractError](https://botmesh.afaya.com.co/api/core/testing/classes/IdentityContractError.md) listing every violation unless the
events satisfy the identity stability contract (see
[checkIdentityContract](https://botmesh.afaya.com.co/api/core/testing/functions/checkIdentityContract.md)). Runner-agnostic: works in any test framework.

## Parameters

| Parameter | Type |
| - | - |
| `events` | readonly [`IdentityEventInput`](https://botmesh.afaya.com.co/api/core/testing/type-aliases/IdentityEventInput)\[] |
| `expectations?` | [`IdentityExpectations`](https://botmesh.afaya.com.co/api/core/testing/type-aliases/IdentityExpectations) |
| `options?` | [`IdentityContractOptions`](https://botmesh.afaya.com.co/api/core/testing/interfaces/IdentityContractOptions) |

## Returns

`void`

## Throws


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