mochajs / mocha

☕️ simple, flexible, fun javascript test framework for node.js & the browser

Home Page:https://mochajs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation around glob patterns and shell expansion

jsdevel opened this issue · comments

Not sure if it is needed, but it may be worth noting that due to shell expansion, glob patterns should be wrapped in single quotes on unix shells.

mocha -w -r should 'test/**/*.js'

Using that would render the --recursive flag useless.

Similar to #1175.

I agree that this should be noted. Seems like it should be added in the man page and on the site's rendering of the man page.

I'm not sure what's the standard way of noting this precondition of globbing.

Would it be like:

Usage: mocha [debug] [options] [files | 'glob']

or

Usage: mocha [debug] [options] [files] ['glob']

or should it be a separate section "Notes" that contains the hint to quote the glob?

Good catch!

💯 👍 got bitten by this! thank you!

Anyone willing to create a PR for this?

Is this done (from 3+ years ago)?