From b0702337dfae69de9b7a71e122cbbbdab6c2424e Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 10 Mar 2022 20:43:17 +0100 Subject: [PATCH] DEV: Fix rake qunit logging (#16159) It was logging just the first passed object, which resulted printing out empty lines instead of actual messages (e.g. deprecation warnings) --- test/run-qunit.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/run-qunit.js b/test/run-qunit.js index de5bd7f8aff..94d53054d6d 100644 --- a/test/run-qunit.js +++ b/test/run-qunit.js @@ -109,16 +109,12 @@ async function runAllTests() { const message = response["args"][0].value; // Not finished yet, don't add a newline - if (message && message.startsWith && message.startsWith("↪")) { + if (message?.startsWith?.("↪")) { process.stdout.write(message); - } else if ( - message && - message.startsWith && - message.startsWith("AUTOSPEC:") - ) { + } else if (message?.startsWith?.("AUTOSPEC:")) { fs.appendFileSync(QUNIT_RESULT, `${message.slice(10)}\n`); } else { - console.log(message); + console.log(...response["args"].map((m) => m.value)); } });