Skip to content
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

File globbing not documented on site #3098

Closed
wzup opened this issue Nov 7, 2017 · 2 comments · Fixed by #3217
Closed

File globbing not documented on site #3098

wzup opened this issue Nov 7, 2017 · 2 comments · Fixed by #3217
Labels
area: documentation anything involving docs or mochajs.org good first issue new contributors should look here! status: accepting prs Mocha can use your help with this one!

Comments

@wzup
Copy link

wzup commented Nov 7, 2017

How to configure it? This for example

By default, mocha looks for the glob ./test/.js and ./test/.coffee, so you may want to put your tests in test/ folder.

No any info in whole docs and wiki

@ORESoftware
Copy link

+1

@ScottFreeCode
Copy link
Contributor

Besides https://mochajs.org/#the-test-directory, there is https://mochajs.org/#usage:

Usage: mocha [debug] [options] [files]
(...list of options...)

However, I'm surprised that we don't have anywhere that the possibilities of globbing are highlighted, e.g. using lib/**/*.test.js. Even if we just pointed people at the glob NPM package for details on the supported syntaxes. (Although I think it would probably also be worth mentioning the pattern of putting files that need to run inside mocha.opts and then the default all-tests glob inside the test script in package.json so npm test runs all tests but mocha <path to specific file> runs only specific tests.)

I'm also surprised at the reference to Coffeescript -- I'm pretty sure that hasn't actually been part of the default for a long time... Clearly this whole section is long overdue for some TLC.

Site repo is at https://github.com/mochajs/mochajs.github.io, although we eventually want to get it merged into this repo...

@ScottFreeCode ScottFreeCode changed the title Configuration? File globbing not documented on site Nov 8, 2017
@ScottFreeCode ScottFreeCode added area: documentation anything involving docs or mochajs.org good first issue new contributors should look here! status: accepting prs Mocha can use your help with this one! labels Nov 8, 2017
This was referenced Sep 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation anything involving docs or mochajs.org good first issue new contributors should look here! status: accepting prs Mocha can use your help with this one!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants