From 205927fe6b3a68afc83938d52e4f1e3c2ae1ed07 Mon Sep 17 00:00:00 2001 From: Russell Dempsey Date: Fri, 6 Oct 2017 09:44:50 -0700 Subject: [PATCH] test: display better error message for assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit makes understanding assertion failures easier by displaying the values that failed the assertion. PR-URL: https://github.com/nodejs/node/pull/15883 Reviewed-By: Rich Trott Reviewed-By: Michaƫl Zasso --- test/parallel/test-zlib-random-byte-pipes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-zlib-random-byte-pipes.js b/test/parallel/test-zlib-random-byte-pipes.js index 5eb048101cf513..9c679ab0a0a2fa 100644 --- a/test/parallel/test-zlib-random-byte-pipes.js +++ b/test/parallel/test-zlib-random-byte-pipes.js @@ -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}'.`); }));