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-test-files.md.
close
  • 简体中文
  • hideSkippedTestFiles

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

    隐藏已跳过的测试文件日志。当过滤条件或文件级跳过导致输出中出现大量跳过文件时尤其有用。

    底部的汇总统计仍会包含被跳过的测试文件数量。

    CLI
    rstest.config.ts
    npx rstest --hideSkippedTestFiles

    示例

    默认情况下,Rstest 会输出所有测试文件,包括被跳过的文件:

     ✓ test/index.test.ts (1)
     - test/all-skipped.test.ts (2)
    
     Test Files 1 passed | 1 skipped
          Tests 1 passed | 2 skipped (3)
       Duration 93ms (build 50ms, tests 43ms)

    设置 hideSkippedTestFiles: true 后,文件列表中不再显示被跳过的文件:

     ✓ test/index.test.ts (1)
    
     Test Files 1 passed | 1 skipped
          Tests 1 passed | 2 skipped (3)
       Duration 93ms (build 50ms, tests 43ms)