From b436ccc3b2d70ee048a4f2d34955da7842cedcb9 Mon Sep 17 00:00:00 2001 From: Yitong Date: Fri, 12 Oct 2018 10:04:07 -0700 Subject: [PATCH] test: replace function with arrow function PR-URL: https://github.com/nodejs/node/pull/23474 Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Shelley Vohr --- test/parallel/test-fs-write.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-fs-write.js b/test/parallel/test-fs-write.js index d6022e81067f14..d75974b58d33cf 100644 --- a/test/parallel/test-fs-write.js +++ b/test/parallel/test-fs-write.js @@ -79,10 +79,10 @@ common.allowGlobals(externalizeString, isOneByteString, x); } /* eslint-enable no-undef */ -fs.open(fn, 'w', 0o644, common.mustCall(function(err, fd) { +fs.open(fn, 'w', 0o644, common.mustCall((err, fd) => { assert.ifError(err); - const done = common.mustCall(function(err, written) { + const done = common.mustCall((err, written) => { assert.ifError(err); assert.strictEqual(written, Buffer.byteLength(expected)); fs.closeSync(fd); @@ -91,7 +91,7 @@ fs.open(fn, 'w', 0o644, common.mustCall(function(err, fd) { assert.strictEqual(found, expected); }); - const written = common.mustCall(function(err, written) { + const written = common.mustCall((err, written) => { assert.ifError(err); assert.strictEqual(written, 0); fs.write(fd, expected, 0, 'utf8', done); @@ -113,7 +113,7 @@ fs.open(fn2, args, 0o644, common.mustCall((err, fd) => { assert.strictEqual(found, expected); }); - const written = common.mustCall(function(err, written) { + const written = common.mustCall((err, written) => { assert.ifError(err); assert.strictEqual(written, 0); fs.write(fd, expected, 0, 'utf8', done); @@ -122,10 +122,10 @@ fs.open(fn2, args, 0o644, common.mustCall((err, fd) => { fs.write(fd, '', 0, 'utf8', written); })); -fs.open(fn3, 'w', 0o644, common.mustCall(function(err, fd) { +fs.open(fn3, 'w', 0o644, common.mustCall((err, fd) => { assert.ifError(err); - const done = common.mustCall(function(err, written) { + const done = common.mustCall((err, written) => { assert.ifError(err); assert.strictEqual(written, Buffer.byteLength(expected)); fs.closeSync(fd);