Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Add `--no-warnings` flag

Jakob Krigovsky92561c833cfb
diff --git a/bin/_mocha b/bin/_mocha
index 7ba433ef..bfd526e7 100755
--- a/bin/_mocha
+++ b/bin/_mocha
@@ -96,6 +96,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 <path>', '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 0097153d..814d468a 100755
--- a/bin/mocha
+++ b/bin/mocha
@@ -39,6 +39,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':