DEV: Move the failures list to the end of output (#11082)

No more scrolling up each time the tests fail.

(Alternatively, we could just not show the slowest tests list when there are any failures 🤷‍♂️)
This commit is contained in:
Jarek Radosz 2020-10-30 17:29:45 +01:00 committed by GitHub
parent fa5016ca98
commit ac5c457d9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 9 deletions

View File

@ -234,15 +234,6 @@ function logQUnit() {
QUnit.done(function (context) {
console.log("\n");
if (testErrors.length) {
console.log("Test Errors");
console.log("----------------------------------------------");
testErrors.forEach((e) => {
console.error(e);
});
console.log("\n");
}
console.log("Slowest tests");
console.log("----------------------------------------------");
let ary = Object.keys(durations).map((key) => ({
@ -254,6 +245,17 @@ function logQUnit() {
console.log(pair.key + ": " + pair.value + "ms");
});
console.log("\n");
if (testErrors.length) {
console.log("Test Errors");
console.log("----------------------------------------------");
testErrors.forEach((e) => {
console.error(e);
});
console.log("\n");
}
var stats = [
"Time: " + context.runtime + "ms",
"Total: " + context.total,