@@ 1293-1309 (lines=17) @@ | ||
1290 | * |
|
1291 | * @api private |
|
1292 | */ |
|
1293 | Mocha.prototype._growl = function (runner, reporter) { |
|
1294 | var notify = require('growl'); |
|
1295 | ||
1296 | runner.on('end', function () { |
|
1297 | var stats = reporter.stats; |
|
1298 | if (stats.failures) { |
|
1299 | var msg = stats.failures + ' of ' + runner.total + ' tests failed'; |
|
1300 | notify(msg, { name: 'mocha', title: 'Failed', image: image('error') }); |
|
1301 | } else { |
|
1302 | notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { |
|
1303 | name: 'mocha', |
|
1304 | title: 'Passed', |
|
1305 | image: image('ok') |
|
1306 | }); |
|
1307 | } |
|
1308 | }); |
|
1309 | }; |
|
1310 | ||
1311 | /** |
|
1312 | * Escape string and add it to grep as a regexp. |
@@ 242-258 (lines=17) @@ | ||
239 | * |
|
240 | * @api private |
|
241 | */ |
|
242 | Mocha.prototype._growl = function (runner, reporter) { |
|
243 | var notify = require('growl'); |
|
244 | ||
245 | runner.on('end', function () { |
|
246 | var stats = reporter.stats; |
|
247 | if (stats.failures) { |
|
248 | var msg = stats.failures + ' of ' + runner.total + ' tests failed'; |
|
249 | notify(msg, { name: 'mocha', title: 'Failed', image: image('error') }); |
|
250 | } else { |
|
251 | notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { |
|
252 | name: 'mocha', |
|
253 | title: 'Passed', |
|
254 | image: image('ok') |
|
255 | }); |
|
256 | } |
|
257 | }); |
|
258 | }; |
|
259 | ||
260 | /** |
|
261 | * Escape string and add it to grep as a regexp. |