-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update docs for the glob #3217
update docs for the glob #3217
Conversation
Love it! Thank you for contributing! |
@@ -1272,7 +1272,7 @@ $ mocha --reporter list --growl | |||
|
|||
## The `test/` Directory | |||
|
|||
By default, `mocha` looks for the glob `./test/*.js` and `./test/*.coffee`, so you may want to put your tests in `test/` folder. | |||
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`, because of `./test/*.js` is only matched with files which in the first depth of `test` directory and `./test/**/*.js` is only matched with files which in the second depth of `test` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./test/**/*.js
is only matched with files which in the second depth of
test` directory
Is this true? I though '/**/'
matches zero or more directory levels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://www.npmjs.com/package/glob
** If a "globstar" is alone in a path portion, then it matches zero or more directories and subdirectories searching for matches. It does not crawl symlinked directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This depends on if you pass a glob pattern as a string or use shell expansion. Shell expansion will only expand to the second level, and actually exactly the second level, not the first one, so that is also a bit confusing to many
Requirements
Description of the Change
.coffee
doesn't supported now. And I enhance the explanation of glob.Please check my English sentences.
Alternate Designs
N/A
Why should this be in core?
.coffee
doesn't supported now.Benefits
Users don't confuse anymore.
Possible Drawbacks
N/A
Applicable issues
Close #3132
Close #3098