From f535d6252fb90bbacb4d2db78372b5261b9b8e6a Mon Sep 17 00:00:00 2001 From: H Adinarayana Date: Thu, 15 Oct 2020 17:37:43 +0530 Subject: [PATCH] test: add test for listen callback runtime binding PR-URL: https://github.com/nodejs/node/pull/35657 Reviewed-By: Rich Trott Reviewed-By: Gireesh Punathil Reviewed-By: Antoine du Hamel --- test/parallel/test-http-pause.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/parallel/test-http-pause.js b/test/parallel/test-http-pause.js index 0294cf5625b5e8..555eece2e3f13b 100644 --- a/test/parallel/test-http-pause.js +++ b/test/parallel/test-http-pause.js @@ -48,6 +48,8 @@ const server = http.createServer((req, res) => { }); server.listen(0, function() { + // Anonymous function rather than arrow function to test `this` value. + assert.strictEqual(this, server); const req = http.request({ port: this.address().port, path: '/',