test: use arrow function instead of bind

Using an arrow function here eliminates the need to call `bind()`.

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Lance Ball authored and Myles Borins committed 2017-12-12 03:27:13 -05:00
1 parent 25ff8bef18
commit 5cfd4ea3ed
1 file changed
+1 -1
+1 -1
View File
@@ -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);
});
});