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

# hookTimeout

- **Type:** `number`
- **Default:** `10_000`
- **CLI:** `--hookTimeout=10000`

Default timeout of [hook](/api/runtime-api/test-api/hooks.md) in milliseconds. `0` will disable the timeout.


**CLI**

```bash
npx rstest --hookTimeout=10000
```


**rstest.config.ts**

```ts
import { defineConfig } from '@rstest/core';

export default defineConfig({
  hookTimeout: 10000,
});
```


Rstest determines the hook timeout based on the following priority order:

1. [timeout](/api/runtime-api/test-api/hooks.md) configuration in each test case
2. Timeout configured in the test file via [`rs.setConfig({ hookTimeout })`](/api/runtime-api/rstest/utilities.md#rssetconfig)
3. `--hookTimeout` option in CLI
4. `hookTimeout` option in the configuration file
5. Default value of `10_000` milliseconds
