Skip to content

armgit / mocha

Public Imported from GitHub
0

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

move growl require into growl function to avoid errors on windows using command line mocha

Raynosf51c0ba36aee
diff --git a/bin/_mocha b/bin/_mocha
index 96c4ba36..9fc04a48 100755
--- a/bin/_mocha
+++ b/bin/_mocha
@@ -6,7 +6,6 @@
var program = require('commander')
, exec = require('child_process').exec
- , notify = require('growl')
, path = require('path')
, mocha = require('../')
, reporters = mocha.reporters
@@ -241,6 +240,8 @@ function run(suite, fn) {
// enable growl notifications
function growl(runner, reporter) {
+ var notify = require('growl');
+
runner.on('end', function(){
var stats = reporter.stats;
if (stats.failures) {