diff options
author | kanishk30 <kanishk71@gmail.com> | 2018-11-17 17:43:28 +0530 |
---|---|---|
committer | Gireesh Punathil <gpunathi@in.ibm.com> | 2018-11-20 10:32:55 +0530 |
commit | 47495e089aedc0e9cf6bf8380ff8827e58fb36b5 (patch) | |
tree | e226000aa4c8d382dad68176bb81e5a47f88d47b /test | |
parent | 15c2491e7348522a79032402948a5b6e3b771252 (diff) | |
download | android-node-v8-47495e089aedc0e9cf6bf8380ff8827e58fb36b5.tar.gz android-node-v8-47495e089aedc0e9cf6bf8380ff8827e58fb36b5.tar.bz2 android-node-v8-47495e089aedc0e9cf6bf8380ff8827e58fb36b5.zip |
test: replace closure with arrow functions
PR-URL: https://github.com/nodejs/node/pull/24440
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-stream-big-push.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-stream-big-push.js b/test/parallel/test-stream-big-push.js index 503e830f49..2369fac09a 100644 --- a/test/parallel/test-stream-big-push.js +++ b/test/parallel/test-stream-big-push.js @@ -34,7 +34,7 @@ let reads = 0; function _read() { if (reads === 0) { - setTimeout(function() { + setTimeout(() => { r.push(str); }, 1); reads++; @@ -61,7 +61,7 @@ assert.strictEqual(chunk, str); chunk = r.read(); assert.strictEqual(chunk, null); -r.once('readable', function() { +r.once('readable', () => { // this time, we'll get *all* the remaining data, because // it's been added synchronously, as the read WOULD take // us below the hwm, and so it triggered a _read() again, |