From 74e6f0d08f3a040297967898a14c3436a091639c Mon Sep 17 00:00:00 2001 From: Lance Ball Date: Tue, 21 Nov 2017 14:51:41 -0500 Subject: [PATCH] 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 Reviewed-By: Evan Lucas Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Alexey Orlenko Reviewed-By: Colin Ihrig --- test/parallel/test-https-truncate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-https-truncate.js b/test/parallel/test-https-truncate.js index d2a3179c0d178d..30a869c0707e44 100644 --- a/test/parallel/test-https-truncate.js +++ b/test/parallel/test-https-truncate.js @@ -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); }); });