Skip to content

armgit / mocha

Public Imported from GitHub
0

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

add "Uncaught " prefix to uncaught exceptions

TJ Holowaychuk06de21f31f30
diff --git a/lib/reporters/base.js b/lib/reporters/base.js
index 3457db17..215be456 100644
--- a/lib/reporters/base.js
+++ b/lib/reporters/base.js
@@ -161,6 +161,11 @@ exports.list = function(failures){
, expected = err.expected
, escape = true;
+ // uncaught
+ if (err.uncaught) {
+ msg = 'Uncaught ' + msg;
+ }
+
// explicitly show diff
if (err.showDiff) {
escape = false;