Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fixed browser hook error display. Closes #361

TJ Holowaychuk701c538c6be0
diff --git a/lib/reporters/html.js b/lib/reporters/html.js
index 2fb16440..2c3791ce 100644
--- a/lib/reporters/html.js
+++ b/lib/reporters/html.js
@@ -78,7 +78,7 @@ function HTML(runner) {
});
runner.on('fail', function(test, err){
- if (err.uncaught) runner.emit('test end', test);
+ if ('hook' == test.type || err.uncaught) runner.emit('test end', test);
});
runner.on('test end', function(test){