Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Nov 13, 2025

Summary

update default test file glob pattern, only match javascript / typescript test files.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings November 13, 2025 10:52
@netlify
Copy link

netlify bot commented Nov 13, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit fccb6ad
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/6915befeced7ed0008a15c85
😎 Deploy Preview https://deploy-preview-694--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
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 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 isTestFilePath function to use a regex pattern instead of simple string matching
  • Added test coverage to verify that non-JS/TS files (e.g., .txt files) 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.

@9aoy 9aoy requested a review from fi3ework November 13, 2025 11:32
@fi3ework fi3ework merged commit bdafa1c into main Nov 13, 2025
25 of 26 checks passed
@fi3ework fi3ework deleted the vscode-testFileGlobPattern branch November 13, 2025 11:36
@9aoy 9aoy mentioned this pull request Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants