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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/config/index.md
Expand Up @@ -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.

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 🙃


### exclude

Expand Down Expand Up @@ -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.



#### typecheck.exclude

- **Type**: `string[]`
- **Default**: `['**/node_modules/**', '**/dist/**', '**/cypress/**', '**/.{idea,git,cache,output,temp}/**']`

Glob pattern for files that should not be treated as test files
Files to exclude typechecking test runs, using glob patterns.

#### typecheck.allowJs

Expand Down