Skip to content

Commit 1144be0

Browse files
mgjmMylesBorins
authored andcommitted
test: rewrite assert message
`test/parallel/test-zlib-unzip-one-byte-chunks.js` uses a literal string to describe the error if the string does not match itself after zipping and unzipping. Changed to a more descriptive template literal. PR-URL: #15879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 095df35 commit 1144be0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/parallel/test-zlib-unzip-one-byte-chunks.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ const unzip = zlib.createUnzip()
1717
.on('data', (data) => resultBuffers.push(data))
1818
.on('finish', common.mustCall(() => {
1919
assert.deepStrictEqual(Buffer.concat(resultBuffers).toString(), 'abcdef',
20-
'result should match original string');
20+
`'${Buffer.concat(resultBuffers).toString()}' ` +
21+
'should match \'abcdef\' after ' +
22+
'zipping and unzipping');
2123
}));
2224

2325
for (let i = 0; i < data.length; i++) {

0 commit comments

Comments
 (0)