Skip to content

Commit ad25c28

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 <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent c53ed73 commit ad25c28

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)