Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5fa35f6

Browse filesBrowse 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
Copy full SHA for 5fa35f6

File tree

Expand file treeCollapse file tree

1 file changed

+4
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-5
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-fs-read-offset-null.js
+4-5Lines changed: 4 additions & 5 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.