test: deflake test-fs-read-optional-params · nodejs/node@0db1a1e

Original file line numberDiff line numberDiff line change

@@ -11,14 +11,14 @@ const expected = Buffer.from('xyz\n');

1111

const defaultBufferAsync = Buffer.alloc(16384);

1212

const bufferAsOption = Buffer.allocUnsafe(expected.length);

1313
14-

// Test passing in an empty options object

15-

fs.read(fd, { position: 0 }, common.mustCall((err, bytesRead, buffer) => {

14+

// Test not passing in any options object

15+

fs.read(fd, common.mustCall((err, bytesRead, buffer) => {

1616

assert.strictEqual(bytesRead, expected.length);

1717

assert.deepStrictEqual(defaultBufferAsync.length, buffer.length);

1818

}));

1919
20-

// Test not passing in any options object

21-

fs.read(fd, common.mustCall((err, bytesRead, buffer) => {

20+

// Test passing in an empty options object

21+

fs.read(fd, { position: 0 }, common.mustCall((err, bytesRead, buffer) => {

2222

assert.strictEqual(bytesRead, expected.length);

2323

assert.deepStrictEqual(defaultBufferAsync.length, buffer.length);

2424

}));