Skip to content

Commit

Permalink
test: use arrow function instead of bind
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lance authored and MylesBorins committed Dec 12, 2017
1 parent 25ff8be commit 5cfd4ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-https-truncate.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ const test = common.mustCall(function(res) {
res.on('data', function(chunk) {
bytes += chunk.length;
this.pause();
setTimeout(this.resume.bind(this), 1);
setTimeout(() => { this.resume() }, 1);
});
});

0 comments on commit 5cfd4ea

Please sign in to comment.