summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsuman-mitra <summitra@in.ibm.com>2018-11-19 00:58:49 -0800
committerShelley Vohr <shelley.vohr@gmail.com>2019-01-28 23:11:39 -0800
commitfe96ecd7468545dc1023f8d267b52cc815b7677a (patch)
tree241fd1c878ece487f9fc8e6a7990b7a5bafaa5ba
parent636de369cec6de645100afd1e7f7ddf35e5b8f5f (diff)
downloadnode-new-fe96ecd7468545dc1023f8d267b52cc815b7677a.tar.gz
test: replace anonymous closure with arrow func
PR-URL: https://github.com/nodejs/node/pull/24480 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-rw-r--r--test/parallel/test-stream2-unpipe-drain.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-stream2-unpipe-drain.js b/test/parallel/test-stream2-unpipe-drain.js
index 582ab61b06..ac2a3a5b06 100644
--- a/test/parallel/test-stream2-unpipe-drain.js
+++ b/test/parallel/test-stream2-unpipe-drain.js
@@ -51,13 +51,13 @@ const src2 = new TestReader();
src1.pipe(dest);
-src1.once('readable', function() {
- process.nextTick(function() {
+src1.once('readable', () => {
+ process.nextTick(() => {
src2.pipe(dest);
- src2.once('readable', function() {
- process.nextTick(function() {
+ src2.once('readable', () => {
+ process.nextTick(() => {
src1.unpipe(dest);
});
@@ -66,7 +66,7 @@ src1.once('readable', function() {
});
-process.on('exit', function() {
+process.on('exit', () => {
assert.strictEqual(src1.reads, 2);
assert.strictEqual(src2.reads, 2);
});