From a09bdb58478db6355a5a22c1dc8fbfbd94773cd2 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 25 May 2018 12:12:40 +0200 Subject: [PATCH] test: improve console table error output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The former error output was not readable in case of an error. This improves it by splitting the lines and therefore creating a nice and readable diff. PR-URL: https://github.com/nodejs/node/pull/20960 Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Michaƫl Zasso --- test/parallel/test-console-table.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-console-table.js b/test/parallel/test-console-table.js index 2b63556acaa478..9ff4641d65923c 100644 --- a/test/parallel/test-console-table.js +++ b/test/parallel/test-console-table.js @@ -17,7 +17,10 @@ function test(data, only, expected) { only = undefined; } console.table(data, only); - assert.strictEqual(queue.shift(), expected.trimLeft()); + assert.deepStrictEqual( + queue.shift().split('\n'), + expected.trimLeft().split('\n') + ); } common.expectsError(() => console.table([], false), {