diff options
author | Anto Aravinth <anto.aravinth.cse@gmail.com> | 2018-07-28 10:00:32 +0530 |
---|---|---|
committer | Trivikram Kamat <16024985+trivikr@users.noreply.github.com> | 2018-08-01 06:58:31 -0700 |
commit | f2518c4915e1f72252812ce347905c00789d8bab (patch) | |
tree | f764588797e3fb3ba5c97b5739f3e2a5b1715a52 /test/parallel/test-http2-compat-serverresponse-finished.js | |
parent | 19aa41c6fc92408fa078d3a10d780a599f7bca01 (diff) | |
download | android-node-v8-f2518c4915e1f72252812ce347905c00789d8bab.tar.gz android-node-v8-f2518c4915e1f72252812ce347905c00789d8bab.tar.bz2 android-node-v8-f2518c4915e1f72252812ce347905c00789d8bab.zip |
test: refactor test-http2-compat-serverresponse-finished.js
PR-URL: https://github.com/nodejs/node/pull/21929
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-http2-compat-serverresponse-finished.js')
-rw-r--r-- | test/parallel/test-http2-compat-serverresponse-finished.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-http2-compat-serverresponse-finished.js b/test/parallel/test-http2-compat-serverresponse-finished.js index ceaa6eb5c3..4da592a5b3 100644 --- a/test/parallel/test-http2-compat-serverresponse-finished.js +++ b/test/parallel/test-http2-compat-serverresponse-finished.js @@ -9,14 +9,14 @@ const net = require('net'); // Http2ServerResponse.finished const server = h2.createServer(); -server.listen(0, common.mustCall(function() { +server.listen(0, common.mustCall(() => { const port = server.address().port; - server.once('request', common.mustCall(function(request, response) { + server.once('request', common.mustCall((request, response) => { assert.ok(response.socket instanceof net.Socket); assert.ok(response.connection instanceof net.Socket); assert.strictEqual(response.socket, response.connection); - response.on('finish', common.mustCall(function() { + response.on('finish', common.mustCall(() => { assert.strictEqual(response.socket, undefined); assert.strictEqual(response.connection, undefined); process.nextTick(common.mustCall(() => { @@ -30,7 +30,7 @@ server.listen(0, common.mustCall(function() { })); const url = `http://localhost:${port}`; - const client = h2.connect(url, common.mustCall(function() { + const client = h2.connect(url, common.mustCall(() => { const headers = { ':path': '/', ':method': 'GET', @@ -38,7 +38,7 @@ server.listen(0, common.mustCall(function() { ':authority': `localhost:${port}` }; const request = client.request(headers); - request.on('end', common.mustCall(function() { + request.on('end', common.mustCall(() => { client.close(); })); request.end(); |