☕️ Classic, reliable, trusted test framework for Node.js and the browser
do not attempt to highlight syntax when non-HTML reporter is used
Christopher Hiller0982f5dab6b9
diff --git a/support/tail.js b/support/tail.jsindex 5635fa5f..e9c0c0d2 100644--- a/support/tail.js+++ b/support/tail.js@@ -144,7 +144,8 @@ mocha.run = function(fn){return Mocha.prototype.run.call(mocha, function(err){// The DOM Document is not available in Web Workers.- if (global.document && options.noHighlighting !== true) {+ var document = global.document;+ if (document && document.getElementById('mocha') && options.noHighlighting !== true) {Mocha.utils.highlightTags('code');}if (fn) fn(err);