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 committed 2017-11-22 10:28:23 -05:00
1 parent d7b0c237fb
commit 571ecd1aed
1 file changed
+1 -1
+1 -1
View File
@@ -67,6 +67,6 @@ const test = common.mustCall(function(res) {
res.on('data', function(chunk) { res.on('data', function(chunk) {
bytes += chunk.length; bytes += chunk.length;
this.pause(); this.pause();
setTimeout(this.resume.bind(this), 1); setTimeout(() => { this.resume() }, 1);
}); });
}); });