Skip to content

Commit

Permalink
Added growl icons. Closes mochajs#84
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 26, 2011
1 parent 6d30775 commit 560cdbf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions bin/mocha
Expand Up @@ -23,6 +23,15 @@ var program = require('commander')


var files = []; var files = [];


/**
* Images.
*/

var images = {
fail: __dirname + '/../images/error.png'
, pass: __dirname + '/../images/ok.png'
};

// options // options


program program
Expand Down Expand Up @@ -170,10 +179,11 @@ function growl(runner, reporter) {
var stats = reporter.stats; var stats = reporter.stats;
if (stats.failures) { if (stats.failures) {
var msg = stats.failures + ' of ' + stats.tests + ' tests failed'; var msg = stats.failures + ' of ' + stats.tests + ' tests failed';
notify(msg, { title: 'Failed' }); notify(msg, { title: 'Failed', image: images.fail });
} else { } else {
notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {
title: 'Passed' title: 'Passed'
, image: images.pass
}); });
} }
}); });
Expand Down
Binary file added images/error.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 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.