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 <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
SgtPooki authored and MylesBorins committed Oct 25, 2017
1 parent 4a664ce commit 1690746
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 @@ -129,5 +129,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 1690746

Please sign in to comment.