Permalink
Browse files

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>
  • Loading branch information...
lance authored and MylesBorins committed Nov 21, 2017
1 parent 289ebb1 commit 353e66f823be9be3cbc899ae992449279ed6092f
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/parallel/test-https-truncate.js
@@ -46,6 +46,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 353e66f

Please sign in to comment.