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 <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and jasnell committed Feb 19, 2017
1 parent 6647688 commit c090ca8
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 c090ca8

Please sign in to comment.