Skip to content
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
Next Next commit
test: add problematic values to assert message
  • Loading branch information
johenry committed Oct 6, 2017
commit 4e7ed2dfb89d1f2e7ecafd3b5a7764830de13482
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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