-
-
Notifications
You must be signed in to change notification settings - Fork 17
fix: coverage cannot includes parent folders #825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
71015d5 to
46b14bf
Compare
There was a problem hiding this 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 fixes a bug where the coverage exclude pattern **/[.]* was incorrectly matching and excluding parent folder references in glob patterns. The fix removes this problematic pattern from the default excludes and adjusts the glob configuration to handle hidden files appropriately.
- Removes
**/[.]*from default coverage exclude patterns - Removes
dot: truefrom glob options in coverage generation to prevent matching hidden files by default - Adds comprehensive tests to verify coverage includes files from parent directories correctly
Reviewed changes
Copilot reviewed 6 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/core/src/config.ts |
Removes **/[.]* from default coverage exclude patterns |
packages/core/src/coverage/generate.ts |
Exports getIncludedFiles for testing, removes dot: true option, and adds optional fs parameter for dependency injection |
packages/core/tests/coverage/include.test.ts |
Adds comprehensive test suite verifying parent folder inclusion and hidden file handling |
website/docs/en/config/test/coverage.mdx |
Updates documentation to reflect removed exclude pattern |
website/docs/zh/config/test/coverage.mdx |
Updates Chinese documentation to reflect removed exclude pattern |
packages/core/tests/core/__snapshots__/rstest.test.ts.snap |
Updates snapshots to remove **/[.]* pattern |
packages/core/tests/__snapshots__/config.test.ts.snap |
Updates snapshot to remove **/[.]* pattern |
packages/core/package.json |
Adds memfs dependency and reorders existing dependencies alphabetically |
pnpm-lock.yaml |
Adds memfs@4.51.1 lockfile entry |
.gitignore |
Allows packages/core/tests/coverage directory |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "tinyglobby": "^0.2.15", | ||
| "tinyspy": "^4.0.4", | ||
| "picomatch": "^4.0.3" | ||
| "webpack-license-plugin": "^4.5.1" |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alphabetical reordering of dependencies in package.json is not related to the bug fix and should be separated into its own commit or PR. Mixing code formatting/organization changes with functional changes makes it harder to review and understand what's actually necessary for the fix.
The only functional change needed here is adding "memfs": "^4.51.1" to devDependencies. The reordering of existing entries like moving @types/chai, chai, pathe, birpc, etc. is purely cosmetic.
| "webpack-license-plugin": "^4.5.1" | |
| "webpack-license-plugin": "^4.5.1", | |
| "memfs": "^4.51.1" |
|
👍 |
Summary
The first test case result expected:
but got:
Related Links
Checklist