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 <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
lance authored and gibfahn committed Dec 20, 2017
1 parent b1b9821 commit 74e6f0d
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 74e6f0d

Please sign in to comment.