Skip to content

feat: support hideSkippedTestFiles#867

Merged
9aoy merged 3 commits intomainfrom
hideSkippedTestFiles
Jan 15, 2026
Merged

feat: support hideSkippedTestFiles#867
9aoy merged 3 commits intomainfrom
hideSkippedTestFiles

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Jan 14, 2026

Summary

Support hide skipped test files logs via hideSkippedTestFiles configuration.

By default, Rstest displays logs for all test files.

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

When you set hideSkippedTestFiles to true, Rstest will hide logs for all skipped test files after the test run is complete.

The output will look like this:

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

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings January 14, 2026 11:07
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 14, 2026

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit be43404
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/69677a55c38017000862bcb0
😎 Deploy Preview https://deploy-preview-867--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for a new hideSkippedTestFiles configuration option that allows users to hide logs for test files that are entirely skipped, while still showing the summary statistics. This complements the existing hideSkippedTests option by operating at the file level rather than individual test level.

Changes:

  • Added hideSkippedTestFiles configuration option with default value false
  • Implemented filtering logic in both default and verbose reporters to skip output for skipped test files
  • Added CLI flag --hideSkippedTestFiles support
  • Created comprehensive documentation in both English and Chinese

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/core/src/types/config.ts Added type definitions for the new hideSkippedTestFiles configuration option
packages/core/src/config.ts Added default value for hideSkippedTestFiles in the default configuration
packages/core/src/reporter/index.ts Implemented logic to skip output when hideSkippedTestFiles is enabled and test file status is 'skip'
packages/core/src/reporter/verbose.ts Applied same filtering logic to verbose reporter
packages/core/src/cli/commands.ts Added CLI option for --hideSkippedTestFiles
packages/core/src/cli/init.ts Added support for merging hideSkippedTestFiles from CLI options
website/docs/en/config/test/hide-skipped-test-files.mdx Created English documentation with examples
website/docs/zh/config/test/hide-skipped-test-files.mdx Created Chinese documentation with examples
website/docs/en/config/test/_meta.json Added entry for new documentation page
website/docs/zh/config/test/_meta.json Added entry for new documentation page
website/theme/components/ConfigOverview.tsx Added configuration to overview list
e2e/reporter/index.test.ts Added end-to-end test verifying the feature works correctly
e2e/reporter/fixtures/allSkipped.test.ts Created test fixture with a skipped test
packages/core/tests/snapshots/config.test.ts.snap Updated snapshot to include new configuration option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@9aoy 9aoy merged commit 8bd38c6 into main Jan 15, 2026
24 of 25 checks passed
@9aoy 9aoy deleted the hideSkippedTestFiles branch January 15, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants