close
  • 简体中文
  • hideSkippedTestFiles

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

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

    CLI
    rstest.config.ts
    npx rstest --hideSkippedTestFiles

    示例

    默认情况下,Rstest 会显示所有测试文件的日志。

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

    当你将 hideSkippedTestFiles 设置为 true 时,Rstest 将在测试运行完成后隐藏所有被跳过的测试文件的日志。

    输出将如下所示:

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