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: add problematic values to assert message #15997

Closed
wants to merge 2 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
7 changes: 5 additions & 2 deletions test/pummel/test-stream-pipe-multi.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ FakeStream.prototype.close = function() {

// expect all streams to close properly.
process.on('exit', function() {
assert.strictEqual(cnt, wclosed, 'writable streams closed');
assert.strictEqual(cnt, rclosed, 'readable streams closed');
wclosed = rclosed = 0;
Copy link
Member

@BridgeAR BridgeAR Oct 6, 2017

Choose a reason for hiding this comment

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

I am not sure why this was added here. In general I think it would be best to just remove the error message in the strictEqual

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, @johenry if you could push a commit that just makes it

assert.strictEqual(cnt, wclosed)
assert.strictEqual(cnt, rclosed)

that'd be great!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gibfahn Done. Thanks for the help.

assert.strictEqual(cnt, wclosed, `Expected ${cnt} writable streams closed ` +
`but only saw ${wclosed}`);
assert.strictEqual(cnt, rclosed, `Expected ${cnt} readable streams closed ` +
`but only saw ${rclosed}`);
});

for (let i = 0; i < chunkSize; i++) {
Expand Down