Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Revert "only write to stdout in reporters"

Travis Jeffery7e49e3bb5857
diff --git a/lib/reporters/base.js b/lib/reporters/base.js
index a5f68d40..6d51fcfd 100644
--- a/lib/reporters/base.js
+++ b/lib/reporters/base.js
@@ -154,7 +154,7 @@ exports.cursor = {
*/
exports.list = function(failures){
- console.log();
+ console.error();
failures.forEach(function(test, i){
// format
var fmt = color('error title', ' %s) %s:\n')
@@ -200,7 +200,7 @@ exports.list = function(failures){
stack = stack.slice(index ? index + 1 : index)
.replace(/^/gm, ' ');
- console.log(fmt, (i + 1), test.fullTitle(), msg, stack);
+ console.error(fmt, (i + 1), test.fullTitle(), msg, stack);
});
};
@@ -305,10 +305,11 @@ Base.prototype.epilogue = function(){
if (stats.failures) {
fmt = color('fail', ' %d failing');
- console.log(fmt, stats.failures);
+ console.error(fmt,
+ stats.failures);
Base.list(this.failures);
- console.log();
+ console.error();
}
console.log();