Skip to content

Commit

Permalink
test: add error checking in callback
Browse files Browse the repository at this point in the history
Add assert.ifError() for test-dgram-send-callback-buffer-length.

PR-URL: #11446
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott authored and addaleax committed Feb 22, 2017
1 parent 7b80876 commit da10e26
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/parallel/test-dgram-send-callback-buffer-length.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const offset = 20;
const len = buf.length - offset;

const messageSent = common.mustCall(function messageSent(err, bytes) {
assert.ifError(err);
assert.notStrictEqual(bytes, buf.length);
assert.strictEqual(bytes, buf.length - offset);
client.close();
Expand Down

0 comments on commit da10e26

Please sign in to comment.