Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Added growl icons. Closes #84

TJ Holowaychuk560cdbf62a65
diff --git a/bin/mocha b/bin/mocha
index c8b09c6e..91a11794 100755
--- a/bin/mocha
+++ b/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
});
}
});
diff --git a/images/error.png b/images/error.png
new file mode 100644
index 00000000..490822a4
Binary files /dev/null and b/images/error.png differ
diff --git a/images/ok.png b/images/ok.png
new file mode 100644
index 00000000..2983c0bb
Binary files /dev/null and b/images/ok.png differ