-
-
Notifications
You must be signed in to change notification settings - Fork 14
chore(vscode-extension): update default test file glob pattern #694
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. |
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 updates the default test file glob pattern in the VSCode extension to only match JavaScript and TypeScript test files, replacing the previous pattern that matched any extension (e.g., **/*.test.* → **/*.{test,spec}.[jt]s).
Key Changes:
- Updated default glob patterns to specifically target JS/TS files with extensions:
.js,.ts,.jsx,.tsx,.cjs,.mjs,.cts,.mts, and their JSX variants - Modified the
isTestFilePathfunction to use a regex pattern instead of simple string matching - Added test coverage to verify that non-JS/TS files (e.g.,
.txtfiles) are excluded from test discovery
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/vscode/src/config.ts | Updated defaultConfig.testFileGlobPattern to use specific JS/TS file extension patterns |
| packages/vscode/package.json | Updated the configuration schema default values to match the new patterns |
| packages/vscode/src/extension.ts | Replaced simple string matching in isTestFilePath() with regex pattern matching |
| packages/vscode/tests/suite/config.test.ts | Added test assertions to verify default pattern behavior and exclusion of .txt files |
| packages/vscode/tests/fixtures/test/jsFile.spec.js.txt | Added negative test fixture to verify non-JS/TS files are excluded |
| packages/vscode/tests/fixtures/.vscode/settings.json | Removed empty settings file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Summary
update default test file glob pattern, only match javascript / typescript test files.
Related Links
Checklist