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

doc: quote test_runner glob parameters #52201

Merged
merged 1 commit into from Mar 26, 2024
Merged
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
6 changes: 4 additions & 2 deletions doc/api/test.md
Expand Up @@ -350,7 +350,7 @@ The Node.js test runner can be invoked from the command line by passing the
node --test
```

By default Node.js will run all files matching these patterns:
By default, Node.js will run all files matching these patterns:

* `**/*.test.?(c|m)js`
* `**/*-test.?(c|m)js`
Expand All @@ -362,9 +362,11 @@ By default Node.js will run all files matching these patterns:
Alternatively, one or more glob patterns can be provided as the
final argument(s) to the Node.js command, as shown below.
Glob patterns follow the behavior of [`glob(7)`][].
The glob patterns should be enclosed in double quotes on the command line to
prevent shell expansion, which can reduce portability across systems.

```bash
node --test **/*.test.js **/*.spec.js
node --test "**/*.test.js" "**/*.spec.js"
```

Matching files are executed as test files.
Expand Down