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.x
Rich Trott 8 years ago
committed by Myles Borins
parent
commit
7836807178
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  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