diff options
author | James M Snell <jasnell@gmail.com> | 2017-03-24 09:46:44 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-03-26 12:47:15 -0700 |
commit | 4f2e372716714ed030cb5ba6e67107b913f15343 (patch) | |
tree | 9b86be4f904c7844c48cca4194f3c3a5a1decad8 /test/parallel/test-https-close.js | |
parent | d13bd4acc0b60191f0d6e9fae92087242d04dfbd (diff) | |
download | node-new-4f2e372716714ed030cb5ba6e67107b913f15343.tar.gz |
test: add common.noop, default for common.mustCall()
Export a new common.noop no-operation function for general use.
Allow using common.mustCall() without a fn argument to simplify
test cases.
Replace various non-op functions throughout tests with common.noop
PR-URL: https://github.com/nodejs/node/pull/12027
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'test/parallel/test-https-close.js')
-rw-r--r-- | test/parallel/test-https-close.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-https-close.js b/test/parallel/test-https-close.js index cf950f29d6..38cd1819c6 100644 --- a/test/parallel/test-https-close.js +++ b/test/parallel/test-https-close.js @@ -31,7 +31,7 @@ server.on('connection', function(connection) { }); function shutdown() { - server.close(common.mustCall(function() {})); + server.close(common.mustCall()); for (const key in connections) { connections[key].destroy(); @@ -49,7 +49,7 @@ server.listen(0, function() { }; const req = https.request(requestOptions, function(res) { - res.on('data', function(d) {}); + res.on('data', common.noop); setImmediate(shutdown); }); req.end(); |