Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: replace function with arrow function
  • Loading branch information
yitongding authored and Trott committed Oct 14, 2018
commit 99cdfb702c6a4308279f91ead818cf7c63a44401
12 changes: 6 additions & 6 deletions test/parallel/test-fs-write.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down