summaryrefslogtreecommitdiff
path: root/test/parallel/test-stream-push-strings.js
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2017-11-16 13:33:53 +0100
committerTobias Nießen <tniessen@tnie.de>2017-11-18 17:31:46 +0100
commit707cd3f6153941d63adc731314c10a5fc90c5f14 (patch)
tree8965dc4c303e48dace34aba0039e577eebb220dc /test/parallel/test-stream-push-strings.js
parentbbd95554c0d8bc3511a6a118e7e42458e5044a39 (diff)
downloadandroid-node-v8-707cd3f6153941d63adc731314c10a5fc90c5f14.tar.gz
android-node-v8-707cd3f6153941d63adc731314c10a5fc90c5f14.tar.bz2
android-node-v8-707cd3f6153941d63adc731314c10a5fc90c5f14.zip
test: use arrow functions instead of bind
PR-URL: https://github.com/nodejs/node/pull/17070 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Khaidi Chu <i@2333.moe>
Diffstat (limited to 'test/parallel/test-stream-push-strings.js')
-rw-r--r--test/parallel/test-stream-push-strings.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/parallel/test-stream-push-strings.js b/test/parallel/test-stream-push-strings.js
index c2383f3de1..d582c8add0 100644
--- a/test/parallel/test-stream-push-strings.js
+++ b/test/parallel/test-stream-push-strings.js
@@ -36,15 +36,15 @@ class MyStream extends Readable {
case 0:
return this.push(null);
case 1:
- return setTimeout(function() {
+ return setTimeout(() => {
this.push('last chunk');
- }.bind(this), 100);
+ }, 100);
case 2:
return this.push('second to last chunk');
case 3:
- return process.nextTick(function() {
+ return process.nextTick(() => {
this.push('first chunk');
- }.bind(this));
+ });
default:
throw new Error('?');
}