test: add test for listen callback runtime binding

PR-URL: https://github.com/nodejs/node/pull/35657
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
H Adinarayana authored and Beth Griggs committed 2020-12-15 20:13:02 +00:00
1 parent 985efdfa09
commit f535d6252f
1 file changed
+2
+2
View File
@@ -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: '/',