mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test: add mustCall to test-dgram-connect-send-multi-buffer-copy.js
PR-URL: https://github.com/nodejs/node/pull/27465 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
This commit is contained in:
1 parent
0dfe5bebb2
commit
1dd0205f10
1 file changed
+2
-2
@@ -14,12 +14,12 @@ const onMessage = common.mustCall(common.mustCall((err, bytes) => {
|
||||
const buf1 = Buffer.alloc(256, 'x');
|
||||
const buf2 = Buffer.alloc(256, 'y');
|
||||
|
||||
client.on('listening', function() {
|
||||
client.on('listening', common.mustCall(function() {
|
||||
const toSend = [buf1, buf2];
|
||||
client.connect(client.address().port, common.mustCall(() => {
|
||||
client.send(toSend, onMessage);
|
||||
}));
|
||||
});
|
||||
}));
|
||||
|
||||
client.on('message', common.mustCall(function onMessage(buf, info) {
|
||||
const expected = Buffer.concat([buf1, buf2]);
|
||||
|
||||
Reference in new issue
Block a user