Fix double output of the summary line

This commit is contained in:
Stefan Schindler 2021-08-16 20:40:23 +02:00
parent 73d96b090b
commit 5e4657d3f7

View file

@ -93,8 +93,13 @@ function char_printer(n_tests) {
}
},
finish: function() {
const spaces = " ".repeat(max_per_line - (current % max_per_line));
process.stdout.write(`${spaces} (${current}/${n_tests})${os.EOL}${os.EOL}`);
if (current % max_per_line === 0) {
// Don't output if we are already at a matching line end
console.log("");
} else {
const spaces = " ".repeat(max_per_line - (current % max_per_line));
process.stdout.write(`${spaces} (${current}/${n_tests})${os.EOL}${os.EOL}`);
}
},
};
}