> ## Documentation Index
> Fetch the complete documentation index at: https://bun.zhcndoc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用 Bun 测试运行器设置单个测试超时

使用 `--timeout` 标志以毫秒为单位设置每个测试的超时时间。如果任何测试超过此超时，将被标记为失败。

默认超时为 `5000`（5 秒）。

```sh terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun test --timeout 3000 # 3 秒
```

***

完整的 `bun test` 文档请参见 [文档 > 测试运行器](/test)。
