From 66c3dcab720b06243ce6faff4c13828ef395cba9 Mon Sep 17 00:00:00 2001 From: Prabu Subra Date: Sat, 17 Nov 2018 15:50:43 +0530 Subject: [PATCH] test: replace anonymous closure with arrow funct PR-URL: https://github.com/nodejs/node/pull/24439 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani --- test/parallel/test-http-server-stale-close.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-server-stale-close.js b/test/parallel/test-http-server-stale-close.js index b72c2b55a02f25..9502d570942e41 100644 --- a/test/parallel/test-http-server-stale-close.js +++ b/test/parallel/test-http-server-stale-close.js @@ -34,10 +34,10 @@ if (process.env.NODE_TEST_FORK_PORT) { req.write('BAM'); req.end(); } else { - const server = http.createServer(function(req, res) { + const server = http.createServer((req, res) => { res.writeHead(200, { 'Content-Length': '42' }); req.pipe(res); - req.on('close', function() { + req.on('close', () => { server.close(); res.end(); });