◐ Shell
clean mode source ↗

test: use mustSucceed in test-fs-read · nodejs/node@ba8e95a

Original file line numberDiff line numberDiff line change

@@ -8,7 +8,7 @@ const fd = fs.openSync(filepath, 'r');

88

const bufferAsync = Buffer.alloc(0);

99

const bufferSync = Buffer.alloc(0);

1010
11-

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

11+

fs.read(fd, bufferAsync, 0, 0, 0, common.mustSucceed((bytesRead) => {

1212

assert.strictEqual(bytesRead, 0);

1313

assert.deepStrictEqual(bufferAsync, Buffer.alloc(0));

1414

}));