Skip to content

Commit 5cfd4ea

Browse files
lanceMylesBorins
authored andcommitted
test: use arrow function instead of bind
Using an arrow function here eliminates the need to call `bind()`. PR-URL: #17202 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 25ff8be commit 5cfd4ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-https-truncate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ const test = common.mustCall(function(res) {
6767
res.on('data', function(chunk) {
6868
bytes += chunk.length;
6969
this.pause();
70-
setTimeout(this.resume.bind(this), 1);
70+
setTimeout(() => { this.resume() }, 1);
7171
});
7272
});

0 commit comments

Comments
 (0)