From 7cdb225e3d184e77244a3c48356566944d9fc778 Mon Sep 17 00:00:00 2001 From: Jakob Krigovsky Date: Thu, 9 Mar 2017 16:30:18 +0100 Subject: [PATCH 1/2] Add `--no-warnings` flag --- bin/_mocha | 1 + bin/mocha | 1 + 2 files changed, 2 insertions(+) diff --git a/bin/_mocha b/bin/_mocha index 61aac40d3a..d228974f98 100755 --- a/bin/_mocha +++ b/bin/_mocha @@ -95,6 +95,7 @@ program .option('--no-deprecation', 'silence deprecation warnings') .option('--no-exit', 'require a clean shutdown of the event loop: mocha will not call process.exit') .option('--no-timeouts', 'disables timeouts, given implicitly with --debug') + .option('--no-warnings', 'silence all node process warnings') .option('--opts ', 'specify opts path', 'test/mocha.opts') .option('--perf-basic-prof', 'enable perf linux profiler (basic support)') .option('--prof', 'log statistical profiling information') diff --git a/bin/mocha b/bin/mocha index c6aaa97b00..59dc4cfbe5 100755 --- a/bin/mocha +++ b/bin/mocha @@ -38,6 +38,7 @@ process.argv.slice(2).forEach(function (arg) { case '--gc-global': case '--es_staging': case '--no-deprecation': + case '--no-warnings': case '--prof': case '--log-timer-events': case '--throw-deprecation': From 855fb0050c375daca09bfb59a9204ea3358bb1f5 Mon Sep 17 00:00:00 2001 From: Jakob Krigovsky Date: Thu, 9 Mar 2017 16:31:21 +0100 Subject: [PATCH 2/2] Add `--trace-warnings` flag --- bin/_mocha | 1 + bin/mocha | 1 + 2 files changed, 2 insertions(+) diff --git a/bin/_mocha b/bin/_mocha index d228974f98..06e4d1c2da 100755 --- a/bin/_mocha +++ b/bin/_mocha @@ -106,6 +106,7 @@ program .option('--throw-deprecation', 'throw an exception anytime a deprecated function is used') .option('--trace', 'trace function calls') .option('--trace-deprecation', 'show stack traces on deprecations') + .option('--trace-warnings', 'show stack traces on node process warnings') .option('--use_strict', 'enforce strict mode') .option('--watch-extensions ,...', 'additional extensions to monitor with --watch', list, []) .option('--delay', 'wait for async suite definition'); diff --git a/bin/mocha b/bin/mocha index 59dc4cfbe5..a695ba6757 100755 --- a/bin/mocha +++ b/bin/mocha @@ -43,6 +43,7 @@ process.argv.slice(2).forEach(function (arg) { case '--log-timer-events': case '--throw-deprecation': case '--trace-deprecation': + case '--trace-warnings': case '--use_strict': case '--allow-natives-syntax': case '--perf-basic-prof':