Skip to content

Commit

Permalink
test: improve assert message for debugging
Browse files Browse the repository at this point in the history
Previously, the assertion changed in this commit would print the same
message no matter which of the four test cases failed. The assert has
been changed so that it will indicate which test case failed.

Refs: nodejs#6577
  • Loading branch information
Trott committed May 4, 2016
1 parent 7a8dd69 commit 2268660
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-dgram-udp6-send-default-host.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ client.on('listening', function() {

client.on('message', function(buf, info) {
const expected = toSend.shift().toString();
assert.ok(buf.toString() === expected, 'message was received correctly');
assert.strictEqual(buf.toString(), expected);

if (toSend.length === 0) {
client.close();
Expand Down

0 comments on commit 2268660

Please sign in to comment.