Browse files

Added growl icons. Closes #84

  • Loading branch information...
1 parent 6d30775 commit 560cdbf62a6512e57070fc145ab125767c3a1d70 @tj tj committed Nov 26, 2011
Showing with 12 additions and 2 deletions.
  1. +12 −2 bin/mocha
  2. BIN images/error.png
  3. BIN images/ok.png
View
14 bin/mocha
@@ -23,6 +23,15 @@ var program = require('commander')
var files = [];
+/**
+ * Images.
+ */
+
+var images = {
+ fail: __dirname + '/../images/error.png'
+ , pass: __dirname + '/../images/ok.png'
+};
+
// options
program
@@ -170,10 +179,11 @@ function growl(runner, reporter) {
var stats = reporter.stats;
if (stats.failures) {
var msg = stats.failures + ' of ' + stats.tests + ' tests failed';
- notify(msg, { title: 'Failed' });
+ notify(msg, { title: 'Failed', image: images.fail });
} else {
notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {
- title: 'Passed'
+ title: 'Passed'
+ , image: images.pass
});
}
});
View
BIN images/error.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/ok.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 560cdbf

Please sign in to comment.