Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Changed: replace custom growl with growl lib

TJ Holowaychukd470d82d5629
diff --git a/bin/mocha b/bin/mocha
index cedd583d..ef96a3fd 100755
--- a/bin/mocha
+++ b/bin/mocha
@@ -6,6 +6,7 @@
var program = require('commander')
, exec = require('child_process').exec
+ , notify = require('growl')
, path = require('path')
, mocha = require('../')
, reporters = mocha.reporters
@@ -253,31 +254,6 @@ function growl(runner, reporter) {
});
}
-// growl notification
-
-function notify(msg, options) {
- var image
- , args = ['growlnotify', '-m', '"' + msg + '"']
- , options = options || {}
- , fn = fn || function(){};
-
- if (image = options.image) {
- var flag, ext = path.extname(image).substr(1)
- flag = flag || ext == 'icns' && 'iconpath'
- flag = flag || /^[A-Z]/.test(image) && 'appIcon'
- flag = flag || /^png|gif|jpe?g$/.test(ext) && 'image'
- flag = flag || ext && (image = ext) && 'icon'
- flag = flag || 'icon'
- args.push('--' + flag, image)
- }
-
- if (options.sticky) args.push('--sticky');
- if (options.priority) args.push('--priority', options.priority);
- if (options.name) args.push('--name', options.name);
- if (options.title) args.push(options.title);
- exec(args.join(' '), fn);
-}
-
/**
* Parse list.
*/
diff --git a/package.json b/package.json
index b56bee9e..febf4f78 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
}
, "dependencies":{
"commander": "0.3.2"
+ , "growl": "1.4.x"
, "debug": "*"
}
, "devDependencies": {