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

# 使用 Bun 测试运行器设置每个测试的超时时间

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

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

```sh terminal icon="terminal" theme={null}
bun test --timeout 3000 # 3 秒
```

***

参见 [`bun test`](/test)。
