summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2020-11-17 11:57:33 -0800
committerBeth Griggs <bgriggs@redhat.com>2020-12-15 20:15:26 +0000
commit40d59281f737103b23c1e5e0a997a15b5f4caf7c (patch)
tree605421a7aa03b02e5b961497c3c7fc8dfb5704fb
parent81b0562c62c1c0007eabb218c68a720981a970de (diff)
downloadnode-new-40d59281f737103b23c1e5e0a997a15b5f4caf7c.tar.gz
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: https://github.com/nodejs/node/pull/36152 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
-rw-r--r--test/parallel/test-fs-read-offset-null.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/parallel/test-fs-read-offset-null.js b/test/parallel/test-fs-read-offset-null.js
index 96bcbf0f33..27e893f781 100644
--- a/test/parallel/test-fs-read-offset-null.js
+++ b/test/parallel/test-fs-read-offset-null.js
@@ -12,17 +12,16 @@ const fixtures = require('../common/fixtures');
const filepath = fixtures.path('x.txt');
const buf = Buffer.alloc(1);
-// Reading only one character, hence buffer of one byte is enough
+// Reading only one character, hence buffer of one byte is enough.
-// Test for callback api
+// Test for callback API.
fs.open(filepath, 'r', common.mustSucceed((fd) => {
fs.read(fd, { offset: null, buffer: buf },
common.mustSucceed((bytesRead, buffer) => {
- assert.strictEqual(buffer[0], 120);
// Test is done by making sure the first letter in buffer is
// same as first letter in file.
- // 66 is the hex for ascii code of letter B
-
+ // 120 is the hex for ascii code of letter x.
+ assert.strictEqual(buffer[0], 120);
fs.close(fd, common.mustSucceed(() => {}));
}));
}));