Skip to content

Commit

Permalink
test: improve console table error output
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
BridgeAR authored and targos committed Jul 14, 2018
1 parent 4433ecb commit a09bdb5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/parallel/test-console-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -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), {
Expand Down

0 comments on commit a09bdb5

Please sign in to comment.