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); });