Skip to content

Commit da10e26

Browse files
Trottaddaleax
authored andcommitted
test: add error checking in callback
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>
1 parent 7b80876 commit da10e26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const offset = 20;
1111
const len = buf.length - offset;
1212

1313
const messageSent = common.mustCall(function messageSent(err, bytes) {
14+
assert.ifError(err);
1415
assert.notStrictEqual(bytes, buf.length);
1516
assert.strictEqual(bytes, buf.length - offset);
1617
client.close();

0 commit comments

Comments
 (0)