From 786d1c4a725ca34f2dde8fded8097b5fc472ced7 Mon Sep 17 00:00:00 2001 From: Lakshmi Shanmugam Date: Sat, 17 Nov 2018 17:32:09 +0530 Subject: [PATCH] test: change callback function to arrow function --- test/parallel/test-stream-unshift-empty-chunk.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-stream-unshift-empty-chunk.js b/test/parallel/test-stream-unshift-empty-chunk.js index 9c2c12a41a3958..0f0a13722cab14 100644 --- a/test/parallel/test-stream-unshift-empty-chunk.js +++ b/test/parallel/test-stream-unshift-empty-chunk.js @@ -32,14 +32,14 @@ let nChunks = 10; const chunk = Buffer.alloc(10, 'x'); r._read = function(n) { - setImmediate(function() { + setImmediate(() => { r.push(--nChunks === 0 ? null : chunk); }); }; let readAll = false; const seen = []; -r.on('readable', function() { +r.on('readable', () => { let chunk; while (chunk = r.read()) { seen.push(chunk.toString()); @@ -74,7 +74,7 @@ const expect = 'xxxxxxxxxx', 'yyyyy' ]; -r.on('end', function() { +r.on('end', () => { assert.deepStrictEqual(seen, expect); console.log('ok'); });