Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fixed silent hook errors in the HTML reporter. Closes #150

Tj Holowaychuk993c6c92ebf1
diff --git a/lib/reporters/html.js b/lib/reporters/html.js
index 5607beac..e118be7b 100644
--- a/lib/reporters/html.js
+++ b/lib/reporters/html.js
@@ -66,6 +66,10 @@ function HTML(runner) {
stack.shift();
});
+ runner.on('fail', function(test, err){
+ runner.emit('test end', test);
+ });
+
runner.on('test end', function(test){
// TODO: add to stats
var percent = stats.tests / total * 100 | 0;