Skip to content

Commit a09bdb5

Browse files
BridgeARtargos
authored andcommitted
test: improve console table error output
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: #20960 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 4433ecb commit a09bdb5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/parallel/test-console-table.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ function test(data, only, expected) {
1717
only = undefined;
1818
}
1919
console.table(data, only);
20-
assert.strictEqual(queue.shift(), expected.trimLeft());
20+
assert.deepStrictEqual(
21+
queue.shift().split('\n'),
22+
expected.trimLeft().split('\n')
23+
);
2124
}
2225

2326
common.expectsError(() => console.table([], false), {

0 commit comments

Comments
 (0)