☕️ Classic, reliable, trusted test framework for Node.js and the browser
update "Usage" and "--compilers" sections
Christopher Hiller653ba9be2f04
diff --git a/index.md b/index.mdindex 5f9ff68c..9ec01536 100644--- a/index.md+++ b/index.md@@ -705,63 +705,71 @@ Mocha supports the `err.expected` and `err.actual` properties of any thrown `Ass## Usage```-Usage: mocha [debug] [options] [files]---Commands:-- init <path> initialize a client-side mocha setup at <path>--Options:-- -h, --help output usage information- -V, --version output the version number- -A, --async-only force all tests to take a callback (async) or return a promise- -c, --colors force enabling of colors- -C, --no-colors force disabling of colors- -G, --growl enable growl notification support- -O, --reporter-options <k=v,k2=v2,...> reporter-specific options- -R, --reporter <name> specify the reporter to use- -S, --sort sort test files- -b, --bail bail after first test failure- -d, --debug enable node's debugger, synonym for node --debug- -g, --grep <pattern> only run tests matching <pattern>- -f, --fgrep <string> only run tests containing <string>- -gc, --expose-gc expose gc extension- -i, --invert inverts --grep and --fgrep matches- -r, --require <name> require the given module- -s, --slow <ms> "slow" test threshold in milliseconds [75]- -t, --timeout <ms> set test-case timeout in milliseconds [2000]- -u, --ui <name> specify user-interface (bdd|tdd|qunit|exports)- -w, --watch watch files for changes- --check-leaks check for global variable leaks- --full-trace display the full stack trace- --compilers <ext>:<module>,... use the given module(s) to compile files- --debug-brk enable node's debugger breaking on the first line- --globals <names> allow the given comma-delimited global [names]- --es_staging enable all staged features- --harmony<_classes,_generators,...> all node --harmony* flags are available- --preserve-symlinks Instructs the module loader to preserve symbolic links when resolving and caching modules- --icu-data-dir include ICU data- --inline-diffs display actual/expected differences inline within each string- --inspect activate devtools in chrome- --interfaces display available interfaces- --no-deprecation silence deprecation warnings- --no-exit require a clean shutdown of the event loop: mocha will not call process.exit- --no-timeouts disables timeouts, given implicitly with --debug- --opts <path> specify opts path- --perf-basic-prof enable perf linux profiler (basic support)- --prof log statistical profiling information- --log-timer-events Time events including external callbacks- --recursive include sub directories- --reporters display available reporters- --retries <times> set numbers of time to retry a failed test case- --throw-deprecation throw an exception anytime a deprecated function is used- --trace trace function calls- --trace-deprecation show stack traces on deprecations- --use_strict enforce strict mode- --watch-extensions <ext>,... additional extensions to monitor with --watch- --delay wait for async suite definition+ Usage: mocha [debug] [options] [files]+++ Options:++ -V, --version output the version number+ -A, --async-only force all tests to take a callback (async) or return a promise+ -c, --colors force enabling of colors+ -C, --no-colors force disabling of colors+ -G, --growl enable growl notification support+ -O, --reporter-options <k=v,k2=v2,...> reporter-specific options+ -R, --reporter <name> specify the reporter to use+ -S, --sort sort test files+ -b, --bail bail after first test failure+ -d, --debug enable node's debugger, synonym for node --debug+ -g, --grep <pattern> only run tests matching <pattern>+ -f, --fgrep <string> only run tests containing <string>+ -gc, --expose-gc expose gc extension+ -i, --invert inverts --grep and --fgrep matches+ -r, --require <name> require the given module+ -s, --slow <ms> "slow" test threshold in milliseconds [75]+ -t, --timeout <ms> set test-case timeout in milliseconds [2000]+ -u, --ui <name> specify user-interface (bdd|tdd|qunit|exports)+ -w, --watch watch files for changes+ --check-leaks check for global variable leaks+ --full-trace display the full stack trace+ --compilers <ext>:<module>,... use the given module(s) to compile files+ --debug-brk enable node's debugger breaking on the first line+ --globals <names> allow the given comma-delimited global [names]+ --es_staging enable all staged features+ --harmony<_classes,_generators,...> all node --harmony* flags are available+ --preserve-symlinks Instructs the module loader to preserve symbolic links when resolving and caching modules+ --icu-data-dir include ICU data+ --inline-diffs display actual/expected differences inline within each string+ --inspect activate devtools in chrome+ --inspect-brk activate devtools in chrome and break on the first line+ --interfaces display available interfaces+ --no-deprecation silence deprecation warnings+ --exit force shutdown of the event loop after test run: mocha will call process.exit+ --no-timeouts disables timeouts, given implicitly with --debug+ --no-warnings silence all node process warnings+ --opts <path> specify opts path+ --perf-basic-prof enable perf linux profiler (basic support)+ --napi-modules enable experimental NAPI modules+ --prof log statistical profiling information+ --log-timer-events Time events including external callbacks+ --recursive include sub directories+ --reporters display available reporters+ --retries <times> set numbers of time to retry a failed test case+ --throw-deprecation throw an exception anytime a deprecated function is used+ --trace trace function calls+ --trace-deprecation show stack traces on deprecations+ --trace-warnings show stack traces on node process warnings+ --use_strict enforce strict mode+ --watch-extensions <ext>,... additional extensions to monitor with --watch+ --delay wait for async suite definition+ --allow-uncaught enable uncaught errors to propagate+ --forbid-only causes test marked with only to fail the suite+ --forbid-pending causes pending tests and test marked with skip to fail the suite+ -h, --help output usage information+++ Commands:++ init <path> initialize a client-side mocha setup at <path>```### `-w, --watch`@@ -770,6 +778,10 @@ Executes tests on changes to JavaScript in the CWD, and once initially.### `--compilers`+*Updated in Mocha v4.0.0*++**`--compilers` is deprecated as of Mocha v4.0.0. See [further explanation and workarounds](https://github.com/mochajs/mocha/wiki/compilers-deprecation).**+CoffeeScript is no longer supported out of the box. CS and similar transpilersmay be used by mapping the file extensions (for use with `--watch`) and the modulename. For example `--compilers coffee:coffee-script` with CoffeeScript 1.6- or