Skip to content

Commit

Permalink
test: add mustCall to test-dgram-connect-send-multi-buffer-copy.js
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
XGHeaven authored and targos committed Apr 30, 2019
1 parent 0dfe5be commit 1dd0205
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-dgram-connect-send-multi-buffer-copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 1dd0205

Please sign in to comment.