diff --git a/test/parallel/test-http-connect.js b/test/parallel/test-http-connect.js index 4b251832ff1c0f..b019c61573e3fa 100644 --- a/test/parallel/test-http-connect.js +++ b/test/parallel/test-http-connect.js @@ -42,9 +42,9 @@ server.on('connect', common.mustCall((req, socket, firstBodyChunk) => { })); })); -server.listen(0, common.mustCall(function() { +server.listen(0, common.mustCall(() => { const req = http.request({ - port: this.address().port, + port: server.address().port, method: 'CONNECT', path: 'google.com:443' }, common.mustNotCall());