Skip to content

Commit 205927f

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 768060d commit 205927f

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
@@ -150,5 +150,5 @@ const gunz = zlib.createGunzip();
150150
inp.pipe(gzip).pipe(gunz).pipe(out);
151151

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

0 commit comments

Comments
 (0)