Skip to content

Commit ec675b8

Browse files
yitongdingjasnell
authored andcommitted
test: replace function with arrow function
PR-URL: #23474 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
1 parent 923f37f commit ec675b8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/parallel/test-fs-write.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ common.allowGlobals(externalizeString, isOneByteString, x);
7979
}
8080
/* eslint-enable no-undef */
8181

82-
fs.open(fn, 'w', 0o644, common.mustCall(function(err, fd) {
82+
fs.open(fn, 'w', 0o644, common.mustCall((err, fd) => {
8383
assert.ifError(err);
8484

85-
const done = common.mustCall(function(err, written) {
85+
const done = common.mustCall((err, written) => {
8686
assert.ifError(err);
8787
assert.strictEqual(written, Buffer.byteLength(expected));
8888
fs.closeSync(fd);
@@ -91,7 +91,7 @@ fs.open(fn, 'w', 0o644, common.mustCall(function(err, fd) {
9191
assert.strictEqual(found, expected);
9292
});
9393

94-
const written = common.mustCall(function(err, written) {
94+
const written = common.mustCall((err, written) => {
9595
assert.ifError(err);
9696
assert.strictEqual(written, 0);
9797
fs.write(fd, expected, 0, 'utf8', done);
@@ -113,7 +113,7 @@ fs.open(fn2, args, 0o644, common.mustCall((err, fd) => {
113113
assert.strictEqual(found, expected);
114114
});
115115

116-
const written = common.mustCall(function(err, written) {
116+
const written = common.mustCall((err, written) => {
117117
assert.ifError(err);
118118
assert.strictEqual(written, 0);
119119
fs.write(fd, expected, 0, 'utf8', done);
@@ -122,10 +122,10 @@ fs.open(fn2, args, 0o644, common.mustCall((err, fd) => {
122122
fs.write(fd, '', 0, 'utf8', written);
123123
}));
124124

125-
fs.open(fn3, 'w', 0o644, common.mustCall(function(err, fd) {
125+
fs.open(fn3, 'w', 0o644, common.mustCall((err, fd) => {
126126
assert.ifError(err);
127127

128-
const done = common.mustCall(function(err, written) {
128+
const done = common.mustCall((err, written) => {
129129
assert.ifError(err);
130130
assert.strictEqual(written, Buffer.byteLength(expected));
131131
fs.closeSync(fd);

0 commit comments

Comments
 (0)