> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Function: waitForElementToBeRemoved()

> **waitForElementToBeRemoved**\<`T`>(`callback`: `T` | (() => `T`), `options?`: [`waitForOptions`](/next/api/react/testing-library/Interfaces/waitForOptions.md)): `Promise`\<`void`>

## Type Parameters

| Type Parameter |
| -------------- |
| `T`            |

## Parameters

| Parameter  | Type                                                                             |
| ---------- | -------------------------------------------------------------------------------- |
| `callback` | `T` \| (() => `T`)                                                               |
| `options?` | [`waitForOptions`](/next/api/react/testing-library/Interfaces/waitForOptions.md) |

## Returns

`Promise`\<`void`>
