Options (3)
-g, --grepbooleanRun tests that match a specific `grep` pattern
Example:
mocha {{[-g|--grep]}} {{regex}}-w, --watchbooleanRun tests on changes to JavaScript files in the current directory and once initially
Example:
mocha {{[-w|--watch]}}-R, --reporterbooleanRun tests with a specific reporter
Example:
mocha {{[-R|--reporter]}} {{reporter}}Examples (5)
Run tests with default configuration or as configured in `mocha.opts`
Run tests contained at a specific location
mocha path/to/test_directoryRun tests on changes to JavaScript files in the current directory and once initially
mocha [-w|--watch]Run tests with a specific reporter
mocha [-R|--reporter] reportermade by @shridhargupta | data from tldr-pages