☕️ Classic, reliable, trusted test framework for Node.js and the browser
Differentiate mocha notices with a name through Growl
Laszlo Bacsi7b9734d317bc
diff --git a/bin/_mocha b/bin/_mochaindex 4ed26bbb..cd55b0dd 100755--- a/bin/_mocha+++ b/bin/_mocha@@ -309,10 +309,11 @@ function growl(runner, reporter) {var stats = reporter.stats;if (stats.failures) {var msg = stats.failures + ' of ' + runner.total + ' tests failed';- notify(msg, { title: 'Failed', image: images.fail });+ notify(msg, { name: 'mocha', title: 'Failed', image: images.fail });} else {notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {- title: 'Passed'+ name: 'mocha'+ , title: 'Passed', image: images.pass});}diff --git a/lib/mocha.js b/lib/mocha.jsindex 5c377c57..c34407ae 100644--- a/lib/mocha.js+++ b/lib/mocha.js@@ -145,10 +145,11 @@ Mocha.prototype.growl = function(runner, reporter) {var stats = reporter.stats;if (stats.failures) {var msg = stats.failures + ' of ' + runner.total + ' tests failed';- notify(msg, { title: 'Failed', image: image('error') });+ notify(msg, { name: 'mocha', title: 'Failed', image: image('error') });} else {notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {- title: 'Passed'+ name: 'mocha'+ , title: 'Passed', image: image('ok')});}@@ -189,4 +190,4 @@ Mocha.prototype.run = function(fn){if (options.globals) runner.globals(options.globals);if (options.growl) this.growl(runner, reporter);return runner.run(fn);-};\ No newline at end of file+};