Skip to content

Commit 4d1d91d

Browse files
lroweboneskull
authored andcommitted
--allow-uncaught cli option
1 parent fb1e083 commit 4d1d91d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bin/_mocha

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ program
108108
.option('--trace-deprecation', 'show stack traces on deprecations')
109109
.option('--use_strict', 'enforce strict mode')
110110
.option('--watch-extensions <ext>,...', 'additional extensions to monitor with --watch', list, [])
111-
.option('--delay', 'wait for async suite definition');
111+
.option('--delay', 'wait for async suite definition')
112+
.option('--allow-uncaught', 'enable uncaught errors to propagate');
112113

113114
program._name = 'mocha';
114115

@@ -314,6 +315,12 @@ if (program.delay) {
314315
mocha.delay();
315316
}
316317

318+
// --allow-uncaught
319+
320+
if (program.allowUncaught) {
321+
mocha.allowUncaught();
322+
}
323+
317324
// --globals
318325

319326
mocha.globals(globals);

0 commit comments

Comments
 (0)