Skip to content

Commit 1690746

Browse files
SgtPookiMylesBorins
authored andcommitted
test: display better error message for assertion
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>
1 parent 4a664ce commit 1690746

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-zlib-random-byte-pipes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,5 @@ const gunz = zlib.createGunzip();
129129
inp.pipe(gzip).pipe(gunz).pipe(out);
130130

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

0 commit comments

Comments
 (0)