For AI agents: the complete documentation index is available at https://rstest.rs/zh/llms.txt, the full documentation bundle is available at https://rstest.rs/zh/llms-full.txt, and this page is available as Markdown at https://rstest.rs/zh/config/test/hide-skipped-tests.md.
close
  • 简体中文
  • hideSkippedTests

    • 类型: boolean
    • 默认值: false
    • CLI: --hideSkippedTests

    隐藏已跳过的测试用例日志。底部的汇总统计仍会包含被跳过的测试数量。

    使用 default 报告器运行多个测试文件时,默认不会输出单个非失败用例(包括已跳过的用例)。该选项在仅运行单个测试文件,或使用 verbose 报告器 时生效。

    CLI
    rstest.config.ts
    npx rstest --hideSkippedTests

    示例

    使用 verbose 报告器(或运行单个测试文件)时,默认会显示已跳过的测试用例:

     ✓ test/index.test.ts (2) 1ms
      ✓ Index > should add two numbers correctly (0ms)
      - Index > should test source code correctly
    
     Test Files 1 passed
          Tests 1 passed | 1 skipped (2)
       Duration 93ms (build 50ms, tests 43ms)

    设置 hideSkippedTests: true 后,输出中不再显示已跳过的测试用例:

     ✓ 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)