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: https://github.com/nodejs/node/pull/20960 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
8b0c6d8322
commit
cee8677ac4
@ -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), {
|
||||
|
Loading…
x
Reference in New Issue
Block a user