Skip to content

Commit

Permalink
test: rewrite assert message
Browse files Browse the repository at this point in the history
`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 <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
mgjm authored and MylesBorins committed Nov 28, 2017
1 parent 095df35 commit 1144be0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/parallel/test-zlib-unzip-one-byte-chunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const unzip = zlib.createUnzip()
.on('data', (data) => resultBuffers.push(data))
.on('finish', common.mustCall(() => {
assert.deepStrictEqual(Buffer.concat(resultBuffers).toString(), 'abcdef',
'result should match original string');
`'${Buffer.concat(resultBuffers).toString()}' ` +
'should match \'abcdef\' after ' +
'zipping and unzipping');
}));

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

0 comments on commit 1144be0

Please sign in to comment.