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: updated error message for messages count #15979

Closed
wants to merge 5 commits into from
Closed
Changes from 2 commits
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
3 changes: 2 additions & 1 deletion test/internet/test-dgram-multicast-multi-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ function launchChildProcess() {
worker.pid, count);

assert.strictEqual(count, messages.length,
'A worker received an invalid multicast message');
`A worker received an invalid multicast message:
Recieved ${messages.length}, should be ${count}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Recieved -> Received

Copy link
Member

@BridgeAR BridgeAR Oct 7, 2017

Choose a reason for hiding this comment

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

Using multiline template strings is actually discouraged. This would add lots of extra whitespace to the error message. Please use this instead

'A worker received an invalid multicast message' +
  `Received ${messages.length}, should be ${count}`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you! I didn't know about that, we do try to keep messages very short in our code base at work so I didn't know how to handle longer strings! Will fix!

});

clearTimeout(timer);
Expand Down