Skip to content

Commit 39b3300

Browse files
committed
update docs with globbing and shell expansion details; closes mochajs#3136
1 parent 5fc5845 commit 39b3300

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/index.md

+12
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,18 @@ $ mocha --reporter list --growl
12751275

12761276
By default, `mocha` looks for the glob `./test/*.js`, so you may want to put your tests in `test/` folder. If you want to include sub directories, use `--recursive`, since `./test/*.js` only matches files in the first level of `test` and `./test/**/*.js` only matches files in the second level of `test`.
12771277

1278+
To configure where `mocha` looks for tests, you may pass your own glob:
1279+
1280+
```
1281+
$ mocha ./spec/*.js
1282+
```
1283+
1284+
If you use shell expansion for this, you must wrap your glob pattern in double quotes (note, using the `--recursive` flag here is useless):
1285+
1286+
```
1287+
$ mocha "./spec/**/*.js"
1288+
```
1289+
12781290
## Editor Plugins
12791291

12801292
The following editor-related packages are available:

0 commit comments

Comments
 (0)