Make the '✖' for test errors red

This makes it much easier to find the errors in a long list of tests.
This commit is contained in:
Dan Stillman 2015-05-10 02:43:44 -04:00
parent e2b62580d1
commit 84ff141edd

View file

@ -53,9 +53,12 @@ function Reporter(runner) {
runner.on('fail', function(test, err){
failed++;
dump("\r"+indent()+Mocha.reporters.Base.symbols.err+" "+test.title+"\n"+
indent()+" "+err.toString()+" at\n"+
indent()+" "+err.stack.replace("\n", "\n"+indent()+" ", "g"));
dump("\r" + indent()
// Dark red X for errors
+ "\033[31;40m" + Mocha.reporters.Base.symbols.err + "\033[0m"
+ " " + test.title + "\n"
+ indent() + " " + err.toString() + " at\n"
+ indent() + " " + err.stack.replace("\n", "\n" + indent() + " ", "g"));
});
runner.on('end', function() {