| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -350,7 +350,7 @@ The Node.js test runner can be invoked from the command line by passing the | |||
| 350 | 350 | node --test | |
| 351 | 351 | ``` | |
| 352 | 352 | ||
| 353 | - By default Node.js will run all files matching these patterns: | ||
| 353 | + By default, Node.js will run all files matching these patterns: | ||
| 354 | 354 | ||
| 355 | 355 | * `**/*.test.?(c|m)js` | |
| 356 | 356 | * `**/*-test.?(c|m)js` | |
@@ -362,9 +362,11 @@ By default Node.js will run all files matching these patterns: | |||
| 362 | 362 | Alternatively, one or more glob patterns can be provided as the | |
| 363 | 363 | final argument(s) to the Node.js command, as shown below. | |
| 364 | 364 | 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. | ||
| 365 | 367 | ||
| 366 | 368 | ```bash | |
| 367 | - node --test **/*.test.js **/*.spec.js | ||
| 369 | + node --test "**/*.test.js" "**/*.spec.js" | ||
| 368 | 370 | ``` | |
| 369 | 371 | ||
| 370 | 372 | Matching files are executed as test files. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments