mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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>
This commit is contained in:
1 parent
13b7856444
commit
7836807178
1 file changed
+1
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user