Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Added -C, --no-colors to explicitly disable

Tj Holowaychuk193d0b8d3b71
diff --git a/bin/mocha b/bin/mocha
index 10bc0e85..ce14a10a 100755
--- a/bin/mocha
+++ b/bin/mocha
@@ -34,6 +34,7 @@ program
.option('-g, --grep <pattern>', 'only run tests matching <pattern>')
.option('-t, --timeout <ms>', 'set test-case timeout in milliseconds [2000]')
.option('-s, --slow <ms>', '"slow" test threshold in milliseconds [75]', parseInt)
+ .option('-C, --no-colors', 'force disabling of colors')
.option('-G, --growl', 'enable growl support')
// report help
@@ -92,6 +93,10 @@ var suite = new Suite('')
, Reporter = require('../lib/reporters/' + program.reporter)
, ui = interfaces[program.ui](suite);
+// --no-colors
+
+if (!program.colors) Base.useColors = false;
+
// --slow <ms>
if (program.slow) Base.slow = program.slow;