Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
doc: quote test_runner glob parameters
Refs: #52191
  • Loading branch information
meyfa committed Mar 24, 2024
commit b8df0dbf55cbe698a8c21e174502c9f9e37a1036
6 changes: 4 additions & 2 deletions doc/api/test.md
Original file line number Diff line number Diff line change
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