From f0bc3a2c60eec449b0d50c88fd1d6aa2ed89bf48 Mon Sep 17 00:00:00 2001 From: suman-mitra Date: Mon, 19 Nov 2018 00:58:49 -0800 Subject: [PATCH] test: replace anonymous closure with arrow functions --- test/parallel/test-stream2-unpipe-drain.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-stream2-unpipe-drain.js b/test/parallel/test-stream2-unpipe-drain.js index 582ab61b06fb96..ac2a3a5b062c9d 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); });