Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Pass the function into runner.run, so it passes the number of failures.

Arian Stolwijk1043d6b17bef
diff --git a/support/tail.js b/support/tail.js
index 680cb8ab..e3d44727 100644
--- a/support/tail.js
+++ b/support/tail.js
@@ -143,7 +143,6 @@ window.mocha = require('mocha');
if (options.globals) runner.globals(options.globals);
runner.globals(['location']);
runner.on('end', highlightCode);
- if (fn) runner.on('end', fn);
- return runner.run();
+ return runner.run(fn);
};
})();