Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: include value to assert message #15970

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: use default message for assert.strictEqual()
test: because of length limit of message
  • Loading branch information
hwaisiu committed Oct 11, 2017

Verified

This commit was signed with the committer’s verified signature.
mcansh Logan McAnsh
commit fee0e72939f89009b2231b7ab713ccd1a4ab077b
8 changes: 3 additions & 5 deletions test/parallel/test-zlib-from-concatenated-gzip.js
Original file line number Diff line number Diff line change
@@ -22,14 +22,12 @@ assert.strictEqual(zlib.gunzipSync(data).toString(), (abc + def));

zlib.gunzip(data, common.mustCall((err, result) => {
assert.ifError(err);
assert.strictEqual(result.toString(), (abc + def),
`result "${result.toString()}" should match original string: "${(abc + def)}"`);
assert.strictEqual(result.toString(), (abc + def));
}));

zlib.unzip(data, common.mustCall((err, result) => {
assert.ifError(err);
assert.strictEqual(result.toString(), (abc + def),
`result "${result.toString()}" should match original string: "${(abc + def)}"`);
assert.strictEqual(result.toString(), (abc + def));
}));

// Multi-member support does not apply to zlib inflate/deflate.
@@ -39,7 +37,7 @@ zlib.unzip(Buffer.concat([
]), common.mustCall((err, result) => {
assert.ifError(err);
assert.strictEqual(result.toString(), abc,
`result "${result.toString()}" should match contents of first "member": "${abc}"`);
`First "member": ${result.toString()} === ${abc}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is actually more readable if the assertion message is removed.

}));

// files that have the "right" magic bytes for starting a new gzip member