Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Revert "add -E, --growl-errors to growl on failures only"

TJ Holowaychuk61b3f8a3b4d9
diff --git a/bin/_mocha b/bin/_mocha
index 0736d483..46d0188e 100755
--- a/bin/_mocha
+++ b/bin/_mocha
@@ -69,7 +69,6 @@ program
.option('-c, --colors', 'force enabling of colors')
.option('-C, --no-colors', 'force disabling of colors')
.option('-G, --growl', 'enable growl notification support')
- .option('-E, --growl-errors', 'enable growl on failures')
.option('-d, --debug', "enable node's debugger, synonym for node --debug")
.option('-b, --bail', "bail after first test failure")
.option('--recursive', 'include sub directories')
@@ -327,13 +326,13 @@ function run(suite, fn) {
if (program.ignoreLeaks) runner.ignoreLeaks = true;
if (program.grep) runner.grep(new RegExp(utils.escapeRegexp(program.grep)), program.invert);
var reporter = new Reporter(runner);
- if (program.growl || program.growlErrors) growl(runner, reporter, program.growlErrors);
+ if (program.growl) growl(runner, reporter);
runner.run(fn);
}
// enable growl notifications
-function growl(runner, reporter, failuresOnly) {
+function growl(runner, reporter) {
var notify = require('growl');
runner.on('end', function(){
@@ -341,7 +340,7 @@ function growl(runner, reporter, failuresOnly) {
if (stats.failures) {
var msg = stats.failures + ' of ' + runner.total + ' tests failed';
notify(msg, { name: 'mocha', title: 'Failed', image: images.fail });
- } else if (!failuresOnly) {
+ } else {
notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {
name: 'mocha'
, title: 'Passed'