Skip to content

Commit 2add681

Browse files
adinhtdsibmBethGriggs
authored andcommitted
test: add test for listen callback runtime binding
PR-URL: #35657 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 372d9f4 commit 2add681

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/parallel/test-http-pause.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ const server = http.createServer((req, res) => {
4848
});
4949

5050
server.listen(0, function() {
51+
// Anonymous function rather than arrow function to test `this` value.
52+
assert.strictEqual(this, server);
5153
const req = http.request({
5254
port: this.address().port,
5355
path: '/',

0 commit comments

Comments
 (0)