Remove \r characters in test output
Not sure what this does to Windows terminal output, but it causes double linebreaks on GitHub Actions
This commit is contained in:
parent
46bde4c5a2
commit
649d70eeda
1 changed files with 4 additions and 4 deletions
|
@ -100,7 +100,7 @@ function Reporter(runner) {
|
||||||
|
|
||||||
runner.on('suite', function(suite){
|
runner.on('suite', function(suite){
|
||||||
++indents;
|
++indents;
|
||||||
dump("\r"+indent()+suite.title+"\n");
|
dump(indent() + suite.title + "\n");
|
||||||
});
|
});
|
||||||
|
|
||||||
runner.on('suite end', function(suite){
|
runner.on('suite end', function(suite){
|
||||||
|
@ -109,12 +109,12 @@ function Reporter(runner) {
|
||||||
});
|
});
|
||||||
|
|
||||||
runner.on('pending', function(test){
|
runner.on('pending', function(test){
|
||||||
dump("\r"+indent()+"pending -"+test.title+"\n");
|
dump(indent() + "pending -" + test.title + "\n");
|
||||||
});
|
});
|
||||||
|
|
||||||
runner.on('pass', function(test){
|
runner.on('pass', function(test){
|
||||||
passed++;
|
passed++;
|
||||||
var msg = "\r"+indent()+Mocha.reporters.Base.symbols.ok+" "+test.title;
|
var msg = indent() + Mocha.reporters.Base.symbols.ok + " " + test.title;
|
||||||
if ('fast' != test.speed) {
|
if ('fast' != test.speed) {
|
||||||
msg += " ("+Math.round(test.duration)+" ms)";
|
msg += " ("+Math.round(test.duration)+" ms)";
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ function Reporter(runner) {
|
||||||
|
|
||||||
failed++;
|
failed++;
|
||||||
let indentStr = indent();
|
let indentStr = indent();
|
||||||
dump("\r" + indentStr
|
dump(indentStr
|
||||||
// Dark red X for errors
|
// Dark red X for errors
|
||||||
+ "\x1B[31;40m" + Mocha.reporters.Base.symbols.err + " [FAIL]\x1B[0m"
|
+ "\x1B[31;40m" + Mocha.reporters.Base.symbols.err + " [FAIL]\x1B[0m"
|
||||||
// Trigger bell if interactive
|
// Trigger bell if interactive
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue