Skip to content

Commit

Permalink
test: display better error message for assertion
Browse files Browse the repository at this point in the history
This commit makes understanding assertion failures easier by
displaying the values that failed the assertion.

PR-URL: #15883
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
SgtPooki authored and MylesBorins committed Oct 11, 2017
1 parent 768060d commit 205927f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-zlib-random-byte-pipes.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,5 @@ const gunz = zlib.createGunzip();
inp.pipe(gzip).pipe(gunz).pipe(out);

out.on('data', common.mustCall((c) => {
assert.strictEqual(c, inp._hash, 'hashes should match');
assert.strictEqual(c, inp._hash, `Hash '${c}' equals '${inp._hash}'.`);
}));

0 comments on commit 205927f

Please sign in to comment.