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

# hideSkippedTests

- **类型：** `boolean`
- **默认值：** `false`
- **CLI：** `--hideSkippedTests`

隐藏已跳过的测试用例的日志，以减少测试输出中的噪声。当跳过大量测试用例时（例如启用过滤器运行测试时），此功能尤其有用。

此功能在你使用默认报告器并运行多个测试文件时默认启用。


**CLI**

```bash
npx rstest --hideSkippedTests
```


**rstest.config.ts**

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

export default defineConfig({
  hideSkippedTests: true,
});
```


## 示例

默认情况下，在你使用 [verbose 报告器](/zh/guide/basic/reporters.md#详细报告器)时，Rstest 会显示所有测试用例的日志。

```bash
 ✓ test/index.test.ts (2) 1ms
  ✓ Index > should add two numbers correctly (0ms)
  - Index > should test source code correctly (1ms)

 Test Files 1 passed
      Tests 1 passed | 1 skipped (2)
   Duration 93ms (build 50ms, tests 43ms)
```

当你设置 `hideSkippedTests` 为 `true` 时，Rstest 会在测试完成后隐藏所有跳过的测试用例的日志。

此时输出如下：

```bash
 ✓ test/index.test.ts (2) 1ms
  ✓ Index > should add two numbers correctly (0ms)

 Test Files 1 passed
      Tests 1 passed | 1 skipped (2)
   Duration 93ms (build 50ms, tests 43ms)
```
