Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Add --*-deprecation node flags (close #1217)

Travis Jeffery98a5babe3434
diff --git a/bin/_mocha b/bin/_mocha
index d6b20300..e5472aa4 100755
--- a/bin/_mocha
+++ b/bin/_mocha
@@ -87,11 +87,14 @@ program
.option('--harmony-proxies', 'enable harmony proxies')
.option('--inline-diffs', 'display actual/expected differences inline within each string')
.option('--interfaces', 'display available interfaces')
+ .option('--no-deprecation', 'silence deprecation warnings')
.option('--no-exit', 'require a clean shutdown of the event loop: mocha will not call process.exit')
.option('--prof', 'log statistical profiling information')
.option('--recursive', 'include sub directories')
.option('--reporters', 'display available reporters')
+ .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('--watch-extensions <ext>,...', 'additional extensions to monitor with --watch', list, [])
program.name = 'mocha';
diff --git a/bin/mocha b/bin/mocha
index 742d6077..effa25d2 100755
--- a/bin/mocha
+++ b/bin/mocha
@@ -29,7 +29,10 @@ process.argv.slice(2).forEach(function(arg){
case '--harmony-proxies':
case '--harmony-collections':
case '--harmony-generators':
+ case '--no-deprecation':
case '--prof':
+ case '--throw-deprecation':
+ case '--trace-deprecation':
args.unshift(arg);
break;
default: