Skip to content

Commit 5fa35f6

Browse files
Trottcodebytere
authored andcommitted
test: update comments in test-fs-read-offset-null
Update comment to refer to the correct ASCII code (120 rather than 66). All other changes are cosmetic. PR-URL: #36152 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 48bf59b commit 5fa35f6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/parallel/test-fs-read-offset-null.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@ const fixtures = require('../common/fixtures');
1212
const filepath = fixtures.path('x.txt');
1313

1414
const buf = Buffer.alloc(1);
15-
// Reading only one character, hence buffer of one byte is enough
15+
// Reading only one character, hence buffer of one byte is enough.
1616

17-
// Test for callback api
17+
// Test for callback API.
1818
fs.open(filepath, 'r', common.mustSucceed((fd) => {
1919
fs.read(fd, { offset: null, buffer: buf },
2020
common.mustSucceed((bytesRead, buffer) => {
21-
assert.strictEqual(buffer[0], 120);
2221
// Test is done by making sure the first letter in buffer is
2322
// same as first letter in file.
24-
// 66 is the hex for ascii code of letter B
25-
23+
// 120 is the hex for ascii code of letter x.
24+
assert.strictEqual(buffer[0], 120);
2625
fs.close(fd, common.mustSucceed(() => {}));
2726
}));
2827
}));

0 commit comments

Comments
 (0)