test: add mustCall to test-net-after-close test
PR-URL: https://github.com/nodejs/node/pull/27459 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
6bfde6a81d
commit
095bd569ae
@ -24,10 +24,10 @@ const common = require('../common');
|
|||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
const net = require('net');
|
const net = require('net');
|
||||||
|
|
||||||
const server = net.createServer(function(s) {
|
const server = net.createServer(common.mustCall(function(s) {
|
||||||
console.error('SERVER: got connection');
|
console.error('SERVER: got connection');
|
||||||
s.end();
|
s.end();
|
||||||
});
|
}));
|
||||||
|
|
||||||
server.listen(0, common.mustCall(function() {
|
server.listen(0, common.mustCall(function() {
|
||||||
const c = net.createConnection(this.address().port);
|
const c = net.createConnection(this.address().port);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user