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: https://github.com/nodejs/node/pull/15879
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Martin Michaelis 2017-10-06 09:55:06 -07:00 committed by Rich Trott
parent f170f8493c
commit adbc5d7d57

View File

@ -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++) {