Skip to content

Commit

Permalink
doc: quote test_runner glob parameters
Browse files Browse the repository at this point in the history
Refs: #52191
PR-URL: #52201
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
  • Loading branch information
meyfa authored Mar 26, 2024
1 parent 1264414 commit f1635f4
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit f1635f4

Please sign in to comment.