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

# testTimeout

- **Type:** `number`
- **Default:** `5_000` (`15_000` in Browser Mode)
- **CLI:** `--testTimeout=5000`

Default timeout of a test in milliseconds. `0` will disable the timeout.


**CLI**

```bash
npx rstest --testTimeout=5000
```


**rstest.config.ts**

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

export default defineConfig({
  testTimeout: 5000,
});
```


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

1. [timeout](/api/runtime-api/test-api/test.md#test-1) configuration in each test case
2. Timeout configured in the test file via [`rs.setConfig({ testTimeout })`](/api/runtime-api/rstest/utilities.md#rssetconfig)
3. `--testTimeout` option in CLI
4. `testTimeout` option in the configuration file
5. Default value of `5000` milliseconds (`15000` milliseconds in Browser Mode). Browser Mode also uses a `5000` milliseconds default for `expect.poll.timeout`; Node Mode uses `1000` milliseconds.
