test: add mustCall to net-connect-buffer test

PR-URL: https://github.com/nodejs/node/pull/27446
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Rongjian Zhang 2019-04-28 16:39:49 +08:00 committed by oyyd
parent 757f3f8b2c
commit 73a686f1bb

View File

@ -33,11 +33,11 @@ const tcp = net.Server(common.mustCall((s) => {
buf += d;
});
s.on('end', function() {
s.on('end', common.mustCall(function() {
console.error('SERVER: end', buf);
assert.strictEqual(buf, "L'État, c'est moi");
s.end();
});
}));
}));
tcp.listen(0, common.mustCall(function() {