Skip to content
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

docs: improve globs #3737

Closed
wants to merge 1 commit into from

Conversation

nickmccurdy
Copy link
Contributor

@nickmccurdy nickmccurdy commented Jul 4, 2023

Adds documentation that I originally intended on adding to #3392

@netlify
Copy link

netlify bot commented Jul 4, 2023

Deploy Preview for fastidious-cascaron-4ded94 ready!

Name Link
🔨 Latest commit 71974b9
🔍 Latest deploy log https://app.netlify.com/sites/fastidious-cascaron-4ded94/deploys/64a3f7be421e730008c3faff
😎 Deploy Preview https://deploy-preview-3737--fastidious-cascaron-4ded94.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 site configuration.

@@ -83,7 +83,7 @@ All configuration options that are not supported inside a [workspace](/guide/wor
- **Type:** `string[]`
- **Default:** `['**/__tests__/**/*.?(c|m)[jt]s?(x)', '**/?(*.){test,spec}.?(c|m)[jt]s?(x)']`

Files to include in the test run, using glob pattern.
Files to include in the test run, using glob patterns. By default it looks for files in any folders named `__tests__` with the extensions `.js`,`.mjs`, `.cjs`, `.ts`, `.mts`, `.cts`, `.jsx`, and `.jsx` . It also includes files ending with `.test` or `.spec` along with files just named `test` or `spec` (before a valid extension). These patterns are compatible with Jest's default patterns, but with additional extensions.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Files to include in the test run, using glob patterns. By default it looks for files in any folders named `__tests__` with the extensions `.js`,`.mjs`, `.cjs`, `.ts`, `.mts`, `.cts`, `.jsx`, and `.jsx` . It also includes files ending with `.test` or `.spec` along with files just named `test` or `spec` (before a valid extension). These patterns are compatible with Jest's default patterns, but with additional extensions.
Files to include in the test run, using glob patterns. By default it looks for files in any folders named `__tests__` with the extensions `.js`,`.mjs`, `.cjs`, `.ts`, `.mts`, `.cts`, `.jsx`, and `.tsx`. It also includes files ending with `.test` or `.spec` along with files just named `test` or `spec` (before a valid extension). These patterns are compatible with Vitest default patterns but with additional extensions.

@@ -1372,14 +1372,15 @@ You can also pass down a path to custom binary or command name that produces the
- **Type**: `string[]`
- **Default**: `['**/?(*.){test,spec}-d.?(c|m)[jt]s?(x)']`

Glob pattern for files that should be treated as test files
Files to include in typechecking test runs, using glob patterns. By default all tests inside files ending with `test-d` along with files just named `test-d` are considered type tests.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Files to include in typechecking test runs, using glob patterns. By default all tests inside files ending with `test-d` along with files just named `test-d` are considered type tests.
Files to include in typechecking test runs, using glob patterns. By default, all tests inside files ending with `test-d` along with files just named `test-d` are considered type tests.

@@ -83,7 +83,7 @@ All configuration options that are not supported inside a [workspace](/guide/wor
- **Type:** `string[]`
- **Default:** `['**/__tests__/**/*.?(c|m)[jt]s?(x)', '**/?(*.){test,spec}.?(c|m)[jt]s?(x)']`

Files to include in the test run, using glob pattern.
Files to include in the test run, using glob patterns. By default it looks for files in any folders named `__tests__` with the extensions `.js`,`.mjs`, `.cjs`, `.ts`, `.mts`, `.cts`, `.jsx`, and `.jsx` . It also includes files ending with `.test` or `.spec` along with files just named `test` or `spec` (before a valid extension). These patterns are compatible with Jest's default patterns, but with additional extensions.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is a good idea, as mentioned at #3530 (comment).

Let's not add this to just remove it afterward 🙃

Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

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

I don't think we should move forward on this. As mentioned in #3530 (comment), I think we should revert this behavior and consider it as a regression. And if we are going to do it, I rather not document it as it will confuse users when are we will going to change it back soon.

@antfu
Copy link
Member

antfu commented Jul 8, 2023

Close this as we reverted this behaviour in the recent minor: #3729

Thanks for bringing this up

@antfu antfu closed this Jul 8, 2023
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.

None yet

5 participants