From 4d1d91d68d88a394429cd70a9b15f4fb60fe5e6b Mon Sep 17 00:00:00 2001 From: Laurence Rowe Date: Tue, 31 Jan 2017 19:40:46 -0800 Subject: [PATCH] --allow-uncaught cli option --- bin/_mocha | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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);