From d30fe78546fee5fa0b6838f6d0c999f688d69978 Mon Sep 17 00:00:00 2001 From: Ignasi Date: Wed, 18 Jan 2023 19:27:30 +0100 Subject: [PATCH 1/2] Increase columns width in reporting table --- lib/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli.js b/lib/cli.js index 1b1b94e..9c654d8 100755 --- a/lib/cli.js +++ b/lib/cli.js @@ -55,7 +55,7 @@ async function start() { let table = new Table({ head: ['Spec', 'Time', 'Tests', 'Passing', 'Failing', 'Pending'], style: { head: ['blue'] }, - colWidths: [50, 8, 7, 9, 9, 9] + colWidths: [100, 10, 10, 10, 10, 10] }); let totalTests = 0; From 8158264bb2140ec1dfc6f210d1b2e0e30c2b5672 Mon Sep 17 00:00:00 2001 From: Ignasi Date: Wed, 18 Jan 2023 19:28:23 +0100 Subject: [PATCH 2/2] Exit when failure after calculating time --- lib/cli.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cli.js b/lib/cli.js index 9c654d8..735cd15 100755 --- a/lib/cli.js +++ b/lib/cli.js @@ -112,11 +112,6 @@ async function start() { process.exit(1); } - if (totalFailures > 0) { - process.stderr.write(`\x1b[31m${totalFailures} test failure(s)\n`); - process.exit(1); - } - const timeSaved = totalDuration - timeTaken; console.log( `Total run time: ${totalDuration / 1000}s, executed in: ${ @@ -126,6 +121,11 @@ async function start() { )}%)` ); + if (totalFailures > 0) { + process.stderr.write(`\x1b[31m${totalFailures} test failure(s)\n`); + process.exit(1); + } + generateWeightsFile(specWeights, totalDuration, totalWeight); process.exit(totalFailures); }