Browse Source

test: add error checking in callback

Add assert.ifError() for test-dgram-send-callback-buffer-length.

PR-URL: https://github.com/nodejs/node/pull/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>
v6
Rich Trott 8 years ago
committed by James M Snell
parent
commit
c090ca8160
  1. 1
      test/parallel/test-dgram-send-callback-buffer-length.js

1
test/parallel/test-dgram-send-callback-buffer-length.js

@ -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();

Loading…
Cancel
Save