diff --git a/bin/_mocha b/bin/_mocha index 3539063aeb..7ba433ef05 100755 --- a/bin/_mocha +++ b/bin/_mocha @@ -108,7 +108,8 @@ program .option('--trace-deprecation', 'show stack traces on deprecations') .option('--use_strict', 'enforce strict mode') .option('--watch-extensions ,...', 'additional extensions to monitor with --watch', list, []) - .option('--delay', 'wait for async suite definition'); + .option('--delay', 'wait for async suite definition') + .option('--allow-uncaught', 'enable uncaught errors to propagate'); program._name = 'mocha'; @@ -314,6 +315,12 @@ if (program.delay) { mocha.delay(); } +// --allow-uncaught + +if (program.allowUncaught) { + mocha.allowUncaught(); +} + // --globals mocha.globals(globals);