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: nodejs#15879
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
mgjm authored and Trott committed Oct 11, 2017
1 parent f170f84 commit adbc5d7
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 adbc5d7

Please sign in to comment.