Skip to content

Commit f1635f4

Browse files
authored
doc: quote test_runner glob parameters
Refs: #52191 PR-URL: #52201 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
1 parent 1264414 commit f1635f4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api/test.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ The Node.js test runner can be invoked from the command line by passing the
350350
node --test
351351
```
352352

353-
By default Node.js will run all files matching these patterns:
353+
By default, Node.js will run all files matching these patterns:
354354

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

366368
```bash
367-
node --test **/*.test.js **/*.spec.js
369+
node --test "**/*.test.js" "**/*.spec.js"
368370
```
369371

370372
Matching files are executed as test files.

0 commit comments

Comments
 (0)