summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-12-10 13:27:32 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-12-17 17:14:35 +0100
commit50dd555910ed0338c35f27ee57e947b9ec95724c (patch)
tree73a0d59eb5b1087afa4c42bc667bb268f1a23b72 /test
parentbe3ae339360c9833a77ebf5772786d75b7a8dd78 (diff)
downloadandroid-node-v8-50dd555910ed0338c35f27ee57e947b9ec95724c.tar.gz
android-node-v8-50dd555910ed0338c35f27ee57e947b9ec95724c.tar.bz2
android-node-v8-50dd555910ed0338c35f27ee57e947b9ec95724c.zip
doc,lib,test: capitalize comment sentences
This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/async-hooks/test-callback-error.js2
-rw-r--r--test/async-hooks/test-getaddrinforeqwrap.js2
-rw-r--r--test/async-hooks/test-getnameinforeqwrap.js2
-rw-r--r--test/async-hooks/test-querywrap.js2
-rw-r--r--test/async-hooks/test-udpsendwrap.js2
-rw-r--r--test/async-hooks/verify-graph.js6
-rw-r--r--test/common/index.js4
-rw-r--r--test/js-native-api/test_constructor/test.js2
-rw-r--r--test/js-native-api/test_general/testInstanceOf.js2
-rw-r--r--test/js-native-api/test_general/testNapiRun.js2
-rw-r--r--test/parallel/test-async-wrap-tlssocket-asyncreset.js2
-rw-r--r--test/parallel/test-buffer-alloc.js16
-rw-r--r--test/parallel/test-buffer-bytelength.js2
-rw-r--r--test/parallel/test-buffer-copy.js8
-rw-r--r--test/parallel/test-buffer-includes.js2
-rw-r--r--test/parallel/test-buffer-indexof.js2
-rw-r--r--test/parallel/test-buffer-read.js4
-rw-r--r--test/parallel/test-buffer-slow.js2
-rw-r--r--test/parallel/test-buffer-tostring-range.js4
-rw-r--r--test/parallel/test-child-process-disconnect.js6
-rw-r--r--test/parallel/test-child-process-validate-stdio.js2
-rw-r--r--test/parallel/test-cli-syntax-piped-good.js4
-rw-r--r--test/parallel/test-cluster-disconnect.js2
-rw-r--r--test/parallel/test-cluster-eaccess.js4
-rw-r--r--test/parallel/test-cluster-worker-no-exit.js2
-rw-r--r--test/parallel/test-cluster-worker-wait-server-close.js2
-rw-r--r--test/parallel/test-console.js6
-rw-r--r--test/parallel/test-crypto-authenticated.js4
-rw-r--r--test/parallel/test-crypto-cipher-decipher.js2
-rw-r--r--test/parallel/test-crypto-from-binary.js2
-rw-r--r--test/parallel/test-crypto.js2
-rw-r--r--test/parallel/test-dgram-close-in-listening.js2
-rw-r--r--test/parallel/test-dgram-close-is-not-callback.js2
-rw-r--r--test/parallel/test-domain-ee-implicit.js2
-rw-r--r--test/parallel/test-domain-implicit-fs.js2
-rw-r--r--test/parallel/test-domain-multi.js2
-rw-r--r--test/parallel/test-fs-append-file-sync.js2
-rw-r--r--test/parallel/test-fs-append-file.js16
-rw-r--r--test/parallel/test-fs-non-number-arguments-throw.js2
-rw-r--r--test/parallel/test-fs-null-bytes.js4
-rw-r--r--test/parallel/test-fs-promises-file-handle-chmod.js6
-rw-r--r--test/parallel/test-fs-promises.js2
-rw-r--r--test/parallel/test-fs-realpath-on-substed-drive.js2
-rw-r--r--test/parallel/test-fs-realpath.js4
-rw-r--r--test/parallel/test-fs-utimes.js2
-rw-r--r--test/parallel/test-fs-whatwg-url.js4
-rw-r--r--test/parallel/test-handle-wrap-isrefed.js2
-rw-r--r--test/parallel/test-http-addrequest-localaddress.js2
-rw-r--r--test/parallel/test-http-agent-destroyed-socket.js4
-rw-r--r--test/parallel/test-http-client-pipe-end.js2
-rw-r--r--test/parallel/test-http-client-spurious-aborted.js2
-rw-r--r--test/parallel/test-http-client-timeout-agent.js2
-rw-r--r--test/parallel/test-http-connect-req-res.js2
-rw-r--r--test/parallel/test-http-outgoing-finish.js2
-rw-r--r--test/parallel/test-http-remove-header-stays-removed.js2
-rw-r--r--test/parallel/test-http-request-dont-override-options.js2
-rw-r--r--test/parallel/test-http-response-multiheaders.js2
-rw-r--r--test/parallel/test-http-server-multiheaders2.js2
-rw-r--r--test/parallel/test-http-server-response-standalone.js2
-rw-r--r--test/parallel/test-http-url.parse-basic.js2
-rw-r--r--test/parallel/test-http-wget.js2
-rw-r--r--test/parallel/test-http-write-callbacks.js2
-rw-r--r--test/parallel/test-http-zero-length-write.js2
-rw-r--r--test/parallel/test-http2-altsvc.js2
-rw-r--r--test/parallel/test-http2-client-set-priority.js4
-rw-r--r--test/parallel/test-http2-compat-expect-continue-check.js2
-rw-r--r--test/parallel/test-http2-compat-serverrequest-pause.js2
-rw-r--r--test/parallel/test-http2-compat-serverrequest-pipe.js2
-rw-r--r--test/parallel/test-http2-compat-socket.js4
-rw-r--r--test/parallel/test-http2-connect.js2
-rw-r--r--test/parallel/test-http2-dont-override.js2
-rw-r--r--test/parallel/test-http2-pipe.js2
-rw-r--r--test/parallel/test-http2-respond-file-304.js2
-rw-r--r--test/parallel/test-http2-timeouts.js2
-rw-r--r--test/parallel/test-https-agent-create-connection.js2
-rw-r--r--test/parallel/test-https-argument-of-creating.js2
-rw-r--r--test/parallel/test-https-client-get-url.js2
-rw-r--r--test/parallel/test-https-slow-headers.js2
-rw-r--r--test/parallel/test-https-strict.js2
-rw-r--r--test/parallel/test-https-truncate.js2
-rw-r--r--test/parallel/test-listen-fd-detached-inherit.js4
-rw-r--r--test/parallel/test-listen-fd-detached.js2
-rw-r--r--test/parallel/test-module-version.js2
-rw-r--r--test/parallel/test-net-connect-immediate-finish.js2
-rw-r--r--test/parallel/test-net-connect-options-allowhalfopen.js2
-rw-r--r--test/parallel/test-net-timeout-no-handle.js2
-rw-r--r--test/parallel/test-next-tick-intentional-starvation.js2
-rw-r--r--test/parallel/test-path.js2
-rw-r--r--test/parallel/test-preload.js2
-rw-r--r--test/parallel/test-process-emitwarning.js2
-rw-r--r--test/parallel/test-process-env-allowed-flags.js2
-rw-r--r--test/parallel/test-process-env.js2
-rw-r--r--test/parallel/test-promises-unhandled-rejections.js2
-rw-r--r--test/parallel/test-querystring.js2
-rw-r--r--test/parallel/test-readline-interface.js6
-rw-r--r--test/parallel/test-repl-tab-complete.js4
-rw-r--r--test/parallel/test-repl-underscore.js2
-rw-r--r--test/parallel/test-repl-use-global.js2
-rw-r--r--test/parallel/test-repl.js8
-rw-r--r--test/parallel/test-setproctitle.js2
-rw-r--r--test/parallel/test-stdio-pipe-stderr.js4
-rw-r--r--test/parallel/test-stream-big-push.js2
-rw-r--r--test/parallel/test-stream-duplex-destroy.js2
-rw-r--r--test/parallel/test-stream-pipe-after-end.js4
-rw-r--r--test/parallel/test-stream-readable-async-iterators.js2
-rw-r--r--test/parallel/test-stream-readable-destroy.js2
-rw-r--r--test/parallel/test-stream-readable-event.js2
-rw-r--r--test/parallel/test-stream-readable-flow-recursion.js4
-rw-r--r--test/parallel/test-stream-readable-hwm-0.js2
-rw-r--r--test/parallel/test-stream-readable-reading-readingMore.js8
-rw-r--r--test/parallel/test-stream-readable-resumeScheduled.js4
-rw-r--r--test/parallel/test-stream-unshift-empty-chunk.js2
-rw-r--r--test/parallel/test-stream-writable-destroy.js2
-rw-r--r--test/parallel/test-stream-writable-write-writev-finish.js2
-rw-r--r--test/parallel/test-stream2-basic.js4
-rw-r--r--test/parallel/test-stream2-transform.js4
-rw-r--r--test/parallel/test-stream3-cork-end.js2
-rw-r--r--test/parallel/test-stream3-pause-then-read.js2
-rw-r--r--test/parallel/test-stringbytes-external.js6
-rw-r--r--test/parallel/test-timers-immediate-unref.js2
-rw-r--r--test/parallel/test-timers-reset-process-domain-on-throw.js2
-rw-r--r--test/parallel/test-timers.js2
-rw-r--r--test/parallel/test-tls-client-mindhsize.js2
-rw-r--r--test/parallel/test-tls-socket-close.js2
-rw-r--r--test/parallel/test-url-format.js4
-rw-r--r--test/parallel/test-url-parse-format.js2
-rw-r--r--test/parallel/test-v8-coverage.js6
-rw-r--r--test/parallel/test-whatwg-url-custom-properties.js2
-rw-r--r--test/parallel/test-worker-uncaught-exception-async.js2
-rw-r--r--test/parallel/test-worker-uncaught-exception.js2
-rw-r--r--test/parallel/test-zlib-convenience-methods.js2
-rw-r--r--test/parallel/test-zlib-destroy-pipe.js2
-rw-r--r--test/parallel/test-zlib-flush-drain.js2
-rw-r--r--test/parallel/test-zlib-from-concatenated-gzip.js2
-rw-r--r--test/parallel/test-zlib-from-gzip-with-trailing-garbage.js2
-rw-r--r--test/parallel/test-zlib-from-string.js2
-rw-r--r--test/parallel/test-zlib-truncated.js6
-rw-r--r--test/parallel/test-zlib-write-after-flush.js2
-rw-r--r--test/parallel/test-zlib.js6
-rw-r--r--test/pseudo-tty/test-async-wrap-getasyncid-tty.js2
-rw-r--r--test/pseudo-tty/test-handle-wrap-isrefed-tty.js2
-rw-r--r--test/pummel/test-exec.js2
-rw-r--r--test/pummel/test-process-hrtime.js2
-rw-r--r--test/sequential/test-cli-syntax-file-not-found.js2
-rw-r--r--test/sequential/test-fs-watch.js2
-rw-r--r--test/sequential/test-http-max-http-headers.js2
-rw-r--r--test/sequential/test-module-loading.js8
-rw-r--r--test/sequential/test-next-tick-error-spin.js2
-rw-r--r--test/sequential/test-timers-set-interval-excludes-callback-duration.js2
149 files changed, 214 insertions, 214 deletions
diff --git a/test/async-hooks/test-callback-error.js b/test/async-hooks/test-callback-error.js
index 07ed274342..b52823c930 100644
--- a/test/async-hooks/test-callback-error.js
+++ b/test/async-hooks/test-callback-error.js
@@ -80,7 +80,7 @@ assert.ok(!arg);
assert.strictEqual(signal, null);
} else {
assert.strictEqual(code, null);
- // most posix systems will show 'SIGABRT', but alpine34 does not
+ // Most posix systems will show 'SIGABRT', but alpine34 does not
if (signal !== 'SIGABRT') {
console.log(`parent received signal ${signal}\nchild's stderr:`);
console.log(stderr);
diff --git a/test/async-hooks/test-getaddrinforeqwrap.js b/test/async-hooks/test-getaddrinforeqwrap.js
index f2a978d764..7291ea8a30 100644
--- a/test/async-hooks/test-getaddrinforeqwrap.js
+++ b/test/async-hooks/test-getaddrinforeqwrap.js
@@ -15,7 +15,7 @@ const hooks = initHooks();
hooks.enable();
dns.lookup('www.google.com', 4, common.mustCall(onlookup));
function onlookup() {
- // we don't care about the error here in order to allow
+ // We don't care about the error here in order to allow
// tests to run offline (lookup will fail in that case and the err be set);
const as = hooks.activitiesOfTypes('GETADDRINFOREQWRAP');
diff --git a/test/async-hooks/test-getnameinforeqwrap.js b/test/async-hooks/test-getnameinforeqwrap.js
index 9e06cbf9cb..c7a3937ff3 100644
--- a/test/async-hooks/test-getnameinforeqwrap.js
+++ b/test/async-hooks/test-getnameinforeqwrap.js
@@ -15,7 +15,7 @@ const hooks = initHooks();
hooks.enable();
dns.lookupService('127.0.0.1', 80, common.mustCall(onlookupService));
function onlookupService() {
- // we don't care about the error here in order to allow
+ // We don't care about the error here in order to allow
// tests to run offline (lookup will fail in that case and the err be set)
const as = hooks.activitiesOfTypes('GETNAMEINFOREQWRAP');
diff --git a/test/async-hooks/test-querywrap.js b/test/async-hooks/test-querywrap.js
index f6e7e12e81..5ddb2fe700 100644
--- a/test/async-hooks/test-querywrap.js
+++ b/test/async-hooks/test-querywrap.js
@@ -11,7 +11,7 @@ const dns = require('dns');
const hooks = initHooks();
hooks.enable();
-// uses cares for queryA which in turn uses QUERYWRAP
+// Uses cares for queryA which in turn uses QUERYWRAP
dns.resolve('localhost', common.mustCall(onresolved));
function onresolved() {
diff --git a/test/async-hooks/test-udpsendwrap.js b/test/async-hooks/test-udpsendwrap.js
index d8ab77730f..25b7eb6103 100644
--- a/test/async-hooks/test-udpsendwrap.js
+++ b/test/async-hooks/test-udpsendwrap.js
@@ -21,7 +21,7 @@ function onlistening() {
Buffer.alloc(2), 0, 2, sock.address().port,
undefined, common.mustCall(onsent));
- // init not called synchronously because dns lookup always wraps
+ // Init not called synchronously because dns lookup always wraps
// callback in a next tick even if no lookup is needed
// TODO (trevnorris) submit patch to fix creation of tick objects and instead
// create the send wrap synchronously.
diff --git a/test/async-hooks/verify-graph.js b/test/async-hooks/verify-graph.js
index 95c55c1595..42a45d3f50 100644
--- a/test/async-hooks/verify-graph.js
+++ b/test/async-hooks/verify-graph.js
@@ -14,7 +14,7 @@ function findInGraph(graph, type, n) {
}
function pruneTickObjects(activities) {
- // remove one TickObject on each pass until none is left anymore
+ // Remove one TickObject on each pass until none is left anymore
// not super efficient, but simplest especially to handle
// multiple TickObjects in a row
let foundTickObject = true;
@@ -31,7 +31,7 @@ function pruneTickObjects(activities) {
if (tickObjectIdx >= 0) {
foundTickObject = true;
- // point all triggerAsyncIds that point to the tickObject
+ // Point all triggerAsyncIds that point to the tickObject
// to its triggerAsyncId and finally remove it from the activities
const tickObject = activities[tickObjectIdx];
const newTriggerId = tickObject.triggerAsyncId;
@@ -48,7 +48,7 @@ function pruneTickObjects(activities) {
module.exports = function verifyGraph(hooks, graph) {
pruneTickObjects(hooks);
- // map actual ids to standin ids defined in the graph
+ // Map actual ids to standin ids defined in the graph
const idtouid = {};
const uidtoid = {};
const typeSeen = {};
diff --git a/test/common/index.js b/test/common/index.js
index cd0696c677..275736e272 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -78,7 +78,7 @@ if (process.env.NODE_TEST_WITH_ASYNC_HOOKS) {
const async_wrap = internalBinding('async_wrap');
process.on('exit', () => {
- // iterate through handles to make sure nothing crashes
+ // Iterate through handles to make sure nothing crashes
for (const k in initHandles)
util.inspect(initHandles[k]);
});
@@ -777,7 +777,7 @@ module.exports = {
// use external command
opensslCli = 'openssl';
} else {
- // use command built from sources included in Node.js repository
+ // Use command built from sources included in Node.js repository
opensslCli = path.join(path.dirname(process.execPath), 'openssl-cli');
}
diff --git a/test/js-native-api/test_constructor/test.js b/test/js-native-api/test_constructor/test.js
index 616ba6c2a2..990e70a0a7 100644
--- a/test/js-native-api/test_constructor/test.js
+++ b/test/js-native-api/test_constructor/test.js
@@ -44,7 +44,7 @@ assert.strictEqual(test_object.readonlyAccessor2, 2);
assert.throws(() => { test_object.readonlyAccessor2 = 3; },
/^TypeError: Cannot assign to read only property 'readonlyAccessor2' of object '#<MyObject>'$/);
-// validate that static properties are on the class as opposed
+// Validate that static properties are on the class as opposed
// to the instance
assert.strictEqual(TestConstructor.staticReadonlyAccessor1, 10);
assert.strictEqual(test_object.staticReadonlyAccessor1, undefined);
diff --git a/test/js-native-api/test_general/testInstanceOf.js b/test/js-native-api/test_general/testInstanceOf.js
index 53455a0025..562152caa6 100644
--- a/test/js-native-api/test_general/testInstanceOf.js
+++ b/test/js-native-api/test_general/testInstanceOf.js
@@ -4,7 +4,7 @@ const fs = require('fs');
const common = require('../../common');
const assert = require('assert');
-// addon is referenced through the eval expression in testFile
+// Addon is referenced through the eval expression in testFile
// eslint-disable-next-line no-unused-vars
const addon = require(`./build/${common.buildType}/test_general`);
const path = require('path');
diff --git a/test/js-native-api/test_general/testNapiRun.js b/test/js-native-api/test_general/testNapiRun.js
index af9f89fa29..e322d899ed 100644
--- a/test/js-native-api/test_general/testNapiRun.js
+++ b/test/js-native-api/test_general/testNapiRun.js
@@ -3,7 +3,7 @@
const common = require('../../common');
const assert = require('assert');
-// addon is referenced through the eval expression in testFile
+// `addon` is referenced through the eval expression in testFile
// eslint-disable-next-line no-unused-vars
const addon = require(`./build/${common.buildType}/test_general`);
diff --git a/test/parallel/test-async-wrap-tlssocket-asyncreset.js b/test/parallel/test-async-wrap-tlssocket-asyncreset.js
index 37160741fc..983bce3b02 100644
--- a/test/parallel/test-async-wrap-tlssocket-asyncreset.js
+++ b/test/parallel/test-async-wrap-tlssocket-asyncreset.js
@@ -41,7 +41,7 @@ server.listen(
res.on('error', (err) => assert.fail(err));
res.socket.on('error', (err) => assert.fail(err));
res.resume();
- // drain the socket and wait for it to be free to reuse
+ // Drain the socket and wait for it to be free to reuse
res.socket.once('free', () => {
// This is the pain point. Internally the Agent will call
// `socket._handle.asyncReset()` and if the _handle does not implement
diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js
index cee8799496..8257a221c9 100644
--- a/test/parallel/test-buffer-alloc.js
+++ b/test/parallel/test-buffer-alloc.js
@@ -84,7 +84,7 @@ const outOfRangeError = {
type: RangeError
};
-// try to write a 0-length string beyond the end of b
+// Try to write a 0-length string beyond the end of b
common.expectsError(() => b.write('', 2048), outOfBoundsError);
// throw when writing to negative offset
@@ -96,14 +96,14 @@ common.expectsError(() => b.write('a', 2048), outOfBoundsError);
// throw when writing to negative offset
common.expectsError(() => b.write('a', -1), outOfBoundsError);
-// try to copy 0 bytes worth of data into an empty buffer
+// Try to copy 0 bytes worth of data into an empty buffer
b.copy(Buffer.alloc(0), 0, 0, 0);
-// try to copy 0 bytes past the end of the target buffer
+// Try to copy 0 bytes past the end of the target buffer
b.copy(Buffer.alloc(0), 1, 1, 1);
b.copy(Buffer.alloc(1), 1, 1, 1);
-// try to copy 0 bytes from past the end of the source buffer
+// Try to copy 0 bytes from past the end of the source buffer
b.copy(Buffer.alloc(1), 0, 2048, 2048);
// Testing for smart defaults and ability to pass string values as offset
@@ -183,7 +183,7 @@ Buffer.alloc(1).write('', 1, 0);
}
{
- // make sure only top level parent propagates from allocPool
+ // Make sure only top level parent propagates from allocPool
const b = Buffer.allocUnsafe(5);
const c = b.slice(0, 4);
const d = c.slice(0, 2);
@@ -331,13 +331,13 @@ assert.strictEqual((Buffer.from('Man')).toString('base64'), 'TWFu');
assert.strictEqual(quote.length, bytesWritten);
assert.strictEqual(quote, b.toString('ascii', 0, quote.length));
- // check that the base64 decoder on the constructor works
+ // Check that the base64 decoder on the constructor works
// even in the presence of whitespace.
b = Buffer.from(expectedWhite, 'base64');
assert.strictEqual(quote.length, b.length);
assert.strictEqual(quote, b.toString('ascii', 0, quote.length));
- // check that the base64 decoder ignores illegal chars
+ // Check that the base64 decoder ignores illegal chars
const expectedIllegal = expected.slice(0, 60) + ' \x80' +
expected.slice(60, 120) + ' \xff' +
expected.slice(120, 180) + ' \x00' +
@@ -723,7 +723,7 @@ assert.strictEqual(x.inspect(), '<Buffer 81 a3 66 6f 6f a3 62 61 72>');
}
{
- // test unmatched surrogates not producing invalid utf8 output
+ // Test unmatched surrogates not producing invalid utf8 output
// ef bf bd = utf-8 representation of unicode replacement character
// see https://codereview.chromium.org/121173009/
const buf = Buffer.from('ab\ud800cd', 'utf8');
diff --git a/test/parallel/test-buffer-bytelength.js b/test/parallel/test-buffer-bytelength.js
index 45bd4cf3df..06cdda0b2f 100644
--- a/test/parallel/test-buffer-bytelength.js
+++ b/test/parallel/test-buffer-bytelength.js
@@ -78,7 +78,7 @@ assert.strictEqual(Buffer.byteLength('𠝹𠱓𠱸', 'UTF8'), 12);
assert.strictEqual(Buffer.byteLength('hey there'), 9);
assert.strictEqual(Buffer.byteLength('𠱸挶νξ#xx :)'), 17);
assert.strictEqual(Buffer.byteLength('hello world', ''), 11);
-// it should also be assumed with unrecognized encoding
+// It should also be assumed with unrecognized encoding
assert.strictEqual(Buffer.byteLength('hello world', 'abc'), 11);
assert.strictEqual(Buffer.byteLength('ßœ∑≈', 'unkn0wn enc0ding'), 10);
diff --git a/test/parallel/test-buffer-copy.js b/test/parallel/test-buffer-copy.js
index e9f789a886..86b1bbebcb 100644
--- a/test/parallel/test-buffer-copy.js
+++ b/test/parallel/test-buffer-copy.js
@@ -48,7 +48,7 @@ let cntr = 0;
}
{
- // copy longer buffer b to shorter c without targetStart
+ // Copy longer buffer b to shorter c without targetStart
b.fill(++cntr);
c.fill(++cntr);
const copied = b.copy(c);
@@ -73,7 +73,7 @@ let cntr = 0;
}
{
- // try to copy 513 bytes, and check we don't overrun c
+ // Try to copy 513 bytes, and check we don't overrun c
b.fill(++cntr);
c.fill(++cntr);
const copied = b.copy(c, 0, 0, 513);
@@ -94,7 +94,7 @@ let cntr = 0;
}
}
-// copy string longer than buffer length (failure will segfault)
+// Copy string longer than buffer length (failure will segfault)
const bb = Buffer.allocUnsafe(10);
bb.fill('hello crazy world');
@@ -121,7 +121,7 @@ common.expectsError(
common.expectsError(
() => b.copy(c, 0, -1), errorProperty);
-// when sourceStart is greater than sourceEnd, zero copied
+// When sourceStart is greater than sourceEnd, zero copied
assert.strictEqual(b.copy(c, 0, 100, 10), 0);
// when targetStart > targetLength, zero copied
diff --git a/test/parallel/test-buffer-includes.js b/test/parallel/test-buffer-includes.js
index 50f0d469b6..006961173d 100644
--- a/test/parallel/test-buffer-includes.js
+++ b/test/parallel/test-buffer-includes.js
@@ -193,7 +193,7 @@ for (let i = 66; i < 76; i++) { // from 'B' to 'K'
const longBufferString = Buffer.from(longString);
-// pattern of 15 chars, repeated every 16 chars in long
+// Pattern of 15 chars, repeated every 16 chars in long
let pattern = 'ABACABADABACABA';
for (let i = 0; i < longBufferString.length - pattern.length; i += 7) {
const includes = longBufferString.includes(pattern, i);
diff --git a/test/parallel/test-buffer-indexof.js b/test/parallel/test-buffer-indexof.js
index 3647d115b0..32176fe03c 100644
--- a/test/parallel/test-buffer-indexof.js
+++ b/test/parallel/test-buffer-indexof.js
@@ -248,7 +248,7 @@ for (let i = 66; i < 76; i++) { // from 'B' to 'K'
const longBufferString = Buffer.from(longString);
-// pattern of 15 chars, repeated every 16 chars in long
+// Pattern of 15 chars, repeated every 16 chars in long
let pattern = 'ABACABADABACABA';
for (let i = 0; i < longBufferString.length - pattern.length; i += 7) {
const index = longBufferString.indexOf(pattern, i);
diff --git a/test/parallel/test-buffer-read.js b/test/parallel/test-buffer-read.js
index 94e198fedc..4c9f92259d 100644
--- a/test/parallel/test-buffer-read.js
+++ b/test/parallel/test-buffer-read.js
@@ -32,7 +32,7 @@ read(buf, 'readInt16LE', [1], 0x48fd);
read(buf, 'readInt32BE', [1], -45552945);
read(buf, 'readInt32LE', [1], -806729475);
-// testing basic functionality of readIntBE() and readIntLE()
+// Testing basic functionality of readIntBE() and readIntLE()
read(buf, 'readIntBE', [1, 1], -3);
read(buf, 'readIntLE', [2, 1], 0x48);
@@ -47,7 +47,7 @@ read(buf, 'readUInt16LE', [2], 0xea48);
read(buf, 'readUInt32BE', [1], 0xfd48eacf);
read(buf, 'readUInt32LE', [1], 0xcfea48fd);
-// testing basic functionality of readUIntBE() and readUIntLE()
+// Testing basic functionality of readUIntBE() and readUIntLE()
read(buf, 'readUIntBE', [2, 2], 0x48ea);
read(buf, 'readUIntLE', [2, 2], 0xea48);
diff --git a/test/parallel/test-buffer-slow.js b/test/parallel/test-buffer-slow.js
index e41dd1dd0f..cfea22b02c 100644
--- a/test/parallel/test-buffer-slow.js
+++ b/test/parallel/test-buffer-slow.js
@@ -43,7 +43,7 @@ try {
assert.strictEqual(SlowBuffer('6').length, 6);
assert.strictEqual(SlowBuffer(true).length, 1);
-// should create zero-length buffer if parameter is not a number
+// Should create zero-length buffer if parameter is not a number
assert.strictEqual(SlowBuffer().length, 0);
assert.strictEqual(SlowBuffer(NaN).length, 0);
assert.strictEqual(SlowBuffer({}).length, 0);
diff --git a/test/parallel/test-buffer-tostring-range.js b/test/parallel/test-buffer-tostring-range.js
index 436414e1b7..a06163bac2 100644
--- a/test/parallel/test-buffer-tostring-range.js
+++ b/test/parallel/test-buffer-tostring-range.js
@@ -5,7 +5,7 @@ const assert = require('assert');
const rangeBuffer = Buffer.from('abc');
-// if start >= buffer's length, empty string will be returned
+// If start >= buffer's length, empty string will be returned
assert.strictEqual(rangeBuffer.toString('ascii', 3), '');
assert.strictEqual(rangeBuffer.toString('ascii', +Infinity), '');
assert.strictEqual(rangeBuffer.toString('ascii', 3.14, 3), '');
@@ -25,7 +25,7 @@ assert.strictEqual(rangeBuffer.toString('ascii', '-1', 3), 'abc');
assert.strictEqual(rangeBuffer.toString('ascii', '-1.99', 3), 'abc');
assert.strictEqual(rangeBuffer.toString('ascii', '-Infinity', 3), 'abc');
-// if start is an invalid integer, start will be taken as zero
+// If start is an invalid integer, start will be taken as zero
assert.strictEqual(rangeBuffer.toString('ascii', 'node.js', 3), 'abc');
assert.strictEqual(rangeBuffer.toString('ascii', {}, 3), 'abc');
assert.strictEqual(rangeBuffer.toString('ascii', [], 3), 'abc');
diff --git a/test/parallel/test-child-process-disconnect.js b/test/parallel/test-child-process-disconnect.js
index e1b2c2de01..a1aebf1e08 100644
--- a/test/parallel/test-child-process-disconnect.js
+++ b/test/parallel/test-child-process-disconnect.js
@@ -48,7 +48,7 @@ if (process.argv[2] === 'child') {
socket.end((process.connected).toString());
});
- // when the socket is closed, we will close the server
+ // When the socket is closed, we will close the server
// allowing the process to self terminate
socket.on('end', function() {
server.close();
@@ -77,14 +77,14 @@ if (process.argv[2] === 'child') {
parentFlag = child.connected;
}));
- // the process should also self terminate without using signals
+ // The process should also self terminate without using signals
child.on('exit', common.mustCall());
// when child is listening
child.on('message', function(obj) {
if (obj && obj.msg === 'ready') {
- // connect to child using TCP to know if disconnect was emitted
+ // Connect to child using TCP to know if disconnect was emitted
const socket = net.connect(obj.port);
socket.on('data', function(data) {
diff --git a/test/parallel/test-child-process-validate-stdio.js b/test/parallel/test-child-process-validate-stdio.js
index 26e4c29767..5e23a09884 100644
--- a/test/parallel/test-child-process-validate-stdio.js
+++ b/test/parallel/test-child-process-validate-stdio.js
@@ -8,7 +8,7 @@ const _validateStdio = require('internal/child_process')._validateStdio;
const expectedError =
common.expectsError({ code: 'ERR_INVALID_OPT_VALUE', type: TypeError }, 2);
-// should throw if string and not ignore, pipe, or inherit
+// Should throw if string and not ignore, pipe, or inherit
assert.throws(() => _validateStdio('foo'), expectedError);
// should throw if not a string or array
diff --git a/test/parallel/test-cli-syntax-piped-good.js b/test/parallel/test-cli-syntax-piped-good.js
index 7e0cfbc89a..79716fcf39 100644
--- a/test/parallel/test-cli-syntax-piped-good.js
+++ b/test/parallel/test-cli-syntax-piped-good.js
@@ -12,8 +12,8 @@ const syntaxArgs = [
['--check']
];
-// should not execute code piped from stdin with --check
-// loop each possible option, `-c` or `--check`
+// Should not execute code piped from stdin with --check.
+// Loop each possible option, `-c` or `--check`.
syntaxArgs.forEach(function(args) {
const stdin = 'throw new Error("should not get run");';
const c = spawnSync(node, args, { encoding: 'utf8', input: stdin });
diff --git a/test/parallel/test-cluster-disconnect.js b/test/parallel/test-cluster-disconnect.js
index 219c084a7e..1528233eb3 100644
--- a/test/parallel/test-cluster-disconnect.js
+++ b/test/parallel/test-cluster-disconnect.js
@@ -68,7 +68,7 @@ if (cluster.isWorker) {
}
};
- // start two workers and execute callback when both is listening
+ // Start two workers and execute callback when both is listening
const startCluster = (cb) => {
const workers = 8;
let online = 0;
diff --git a/test/parallel/test-cluster-eaccess.js b/test/parallel/test-cluster-eaccess.js
index 346eb26110..d6cccca5f3 100644
--- a/test/parallel/test-cluster-eaccess.js
+++ b/test/parallel/test-cluster-eaccess.js
@@ -45,7 +45,7 @@ if (cluster.isMaster && process.argv.length !== 3) {
worker.on('online', common.mustCall());
worker.on('message', common.mustCall(function(err) {
- // disconnect first, so that we will not leave zombies
+ // Disconnect first, so that we will not leave zombies
worker.disconnect();
assert.strictEqual(err.code, 'EADDRINUSE');
}));
@@ -54,7 +54,7 @@ if (cluster.isMaster && process.argv.length !== 3) {
const PIPE_NAME = process.env.PIPE_NAME;
const cp = fork(__filename, [PIPE_NAME], { stdio: 'inherit' });
- // message from the child indicates it's ready and listening
+ // Message from the child indicates it's ready and listening
cp.on('message', common.mustCall(function() {
const server = net.createServer().listen(PIPE_NAME, function() {
// message child process so that it can exit
diff --git a/test/parallel/test-cluster-worker-no-exit.js b/test/parallel/test-cluster-worker-no-exit.js
index ecd7c47f5a..d3ee67994b 100644
--- a/test/parallel/test-cluster-worker-no-exit.js
+++ b/test/parallel/test-cluster-worker-no-exit.js
@@ -68,7 +68,7 @@ if (cluster.isMaster) {
});
} else {
process.on('message', function(msg) {
- // we shouldn't exit, not while a network connection exists
+ // We shouldn't exit, not while a network connection exists
net.connect(msg.port);
});
}
diff --git a/test/parallel/test-cluster-worker-wait-server-close.js b/test/parallel/test-cluster-worker-wait-server-close.js
index b8183afb06..849591e573 100644
--- a/test/parallel/test-cluster-worker-wait-server-close.js
+++ b/test/parallel/test-cluster-worker-wait-server-close.js
@@ -39,7 +39,7 @@ if (cluster.isWorker) {
socket.on('connect', function() {
socket.on('data', function() {
console.log('got data from client');
- // socket definitely connected to worker if we got data
+ // Socket definitely connected to worker if we got data
worker.disconnect();
socket.end();
});
diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js
index f781d61994..7448d62208 100644
--- a/test/parallel/test-console.js
+++ b/test/parallel/test-console.js
@@ -149,7 +149,7 @@ console.trace('This is a %j %d', { formatted: 'trace' }, 10, 'foo');
console.time('label');
console.timeEnd('label');
-// verify that Object.prototype properties can be used as labels
+// Verify that Object.prototype properties can be used as labels
console.time('__proto__');
console.timeEnd('__proto__');
console.time('constructor');
@@ -202,7 +202,7 @@ assert.strictEqual(errStrings.length, process.stderr.writeTimes);
restoreStdout();
restoreStderr();
-// verify that console.timeEnd() doesn't leave dead links
+// Verify that console.timeEnd() doesn't leave dead links
const timesMapSize = console._times.size;
console.time('label1');
console.time('label2');
@@ -268,7 +268,7 @@ assert.strictEqual(strings.length, 0);
assert.strictEqual(errStrings.shift().split('\n').shift(),
'Trace: This is a {"formatted":"trace"} 10 foo');
-// hijack stderr to catch `process.emitWarning` which is using
+// Hijack stderr to catch `process.emitWarning` which is using
// `process.nextTick`
hijackStderr(common.mustCall(function(data) {
restoreStderr();
diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js
index b62ce1a5b0..4f382eae6e 100644
--- a/test/parallel/test-crypto-authenticated.js
+++ b/test/parallel/test-crypto-authenticated.js
@@ -153,7 +153,7 @@ for (const test of TEST_CASES) {
msg += decrypt.final(outputEncoding);
assert.strictEqual(msg, test.plain);
} else {
- // assert that final throws if input data could not be verified!
+ // Assert that final throws if input data could not be verified!
assert.throws(function() { decrypt.final('hex'); }, errMessages.auth);
}
}
@@ -192,7 +192,7 @@ for (const test of TEST_CASES) {
msg += decrypt.final('ascii');
assert.strictEqual(msg, test.plain);
} else {
- // assert that final throws if input data could not be verified!
+ // Assert that final throws if input data could not be verified!
assert.throws(function() { decrypt.final('ascii'); }, errMessages.auth);
}
}
diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js
index ed387c3c99..12fa98f3b2 100644
--- a/test/parallel/test-crypto-cipher-decipher.js
+++ b/test/parallel/test-crypto-cipher-decipher.js
@@ -238,7 +238,7 @@ testCipher2(Buffer.from('0123456789abcdef'));
assert.strictEqual(decipher.setAAD(aadbuf), decipher);
}
-// error throwing in setAAD/setAuthTag/getAuthTag/setAutoPadding
+// Error throwing in setAAD/setAuthTag/getAuthTag/setAutoPadding
{
const key = '0123456789';
const aadbuf = Buffer.from('aadbuf');
diff --git a/test/parallel/test-crypto-from-binary.js b/test/parallel/test-crypto-from-binary.js
index 435e0d82da..70bac93a99 100644
--- a/test/parallel/test-crypto-from-binary.js
+++ b/test/parallel/test-crypto-from-binary.js
@@ -33,7 +33,7 @@ const crypto = require('crypto');
const EXTERN_APEX = 0xFBEE9;
-// manually controlled string for checking binary output
+// Manually controlled string for checking binary output
let ucs2_control = 'a\u0000';
// grow the strings to proper length
diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js
index 21e2cca5bd..8bbc1cff80 100644
--- a/test/parallel/test-crypto.js
+++ b/test/parallel/test-crypto.js
@@ -235,7 +235,7 @@ assert.throws(function() {
// Then open private_key.pem and change its header and footer.
const sha1_privateKey = fixtures.readSync('test_bad_rsa_privkey.pem',
'ascii');
- // this would inject errors onto OpenSSL's error stack
+ // This would inject errors onto OpenSSL's error stack
crypto.createSign('sha1').sign(sha1_privateKey);
}, (err) => {
// Throws crypto error, so there is an opensslErrorStack property.
diff --git a/test/parallel/test-dgram-close-in-listening.js b/test/parallel/test-dgram-close-in-listening.js
index 902384e7e0..16432d85d6 100644
--- a/test/parallel/test-dgram-close-in-listening.js
+++ b/test/parallel/test-dgram-close-in-listening.js
@@ -16,7 +16,7 @@ socket.on('listening', function() {
// get a random port for send
const portGetter = dgram.createSocket('udp4')
.bind(0, 'localhost', common.mustCall(() => {
- // adds a listener to 'listening' to send the data when
+ // Adds a listener to 'listening' to send the data when
// the socket is available
socket.send(buf, 0, buf.length,
portGetter.address().port,
diff --git a/test/parallel/test-dgram-close-is-not-callback.js b/test/parallel/test-dgram-close-is-not-callback.js
index 70700a16c6..69c166f42f 100644
--- a/test/parallel/test-dgram-close-is-not-callback.js
+++ b/test/parallel/test-dgram-close-is-not-callback.js
@@ -13,7 +13,7 @@ const portGetter = dgram.createSocket('udp4')
portGetter.address().port,
portGetter.address().address);
- // if close callback is not function, ignore the argument.
+ // If close callback is not function, ignore the argument.
socket.close('bad argument');
portGetter.close();
diff --git a/test/parallel/test-domain-ee-implicit.js b/test/parallel/test-domain-ee-implicit.js
index 7634dd0bff..3b5cf19e8a 100644
--- a/test/parallel/test-domain-ee-implicit.js
+++ b/test/parallel/test-domain-ee-implicit.js
@@ -23,6 +23,6 @@ d.run(common.mustCall(() => {
}));
setTimeout(common.mustCall(() => {
- // escape from the domain, but implicit is still bound to it.
+ // Escape from the domain, but implicit is still bound to it.
implicit.emit('error', new Error('foobar'));
}), 1);
diff --git a/test/parallel/test-domain-implicit-fs.js b/test/parallel/test-domain-implicit-fs.js
index f369598950..d5a6e79bc9 100644
--- a/test/parallel/test-domain-implicit-fs.js
+++ b/test/parallel/test-domain-implicit-fs.js
@@ -40,7 +40,7 @@ d.on('error', common.mustCall(function(er) {
}));
-// implicit handling of thrown errors while in a domain, via the
+// Implicit handling of thrown errors while in a domain, via the
// single entry points of ReqWrap and MakeCallback. Even if
// we try very hard to escape, there should be no way to, even if
// we go many levels deep through timeouts and multiple IO calls.
diff --git a/test/parallel/test-domain-multi.js b/test/parallel/test-domain-multi.js
index 016e9cd128..45d94b35a1 100644
--- a/test/parallel/test-domain-multi.js
+++ b/test/parallel/test-domain-multi.js
@@ -36,7 +36,7 @@ const server = http.createServer((req, res) => {
const b = domain.create();
a.add(b);
- // treat these EE objects as if they are a part of the b domain
+ // Treat these EE objects as if they are a part of the b domain
// so, an 'error' event on them propagates to the domain, rather
// than being thrown.
b.add(req);
diff --git a/test/parallel/test-fs-append-file-sync.js b/test/parallel/test-fs-append-file-sync.js
index 90e3f97d8c..c38a07fef7 100644
--- a/test/parallel/test-fs-append-file-sync.js
+++ b/test/parallel/test-fs-append-file-sync.js
@@ -39,7 +39,7 @@ const data = '南越国是前203年至前111年存在于岭南地区的一个国
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
-// test that empty file will be created and have content added
+// Test that empty file will be created and have content added
const filename = join(tmpdir.path, 'append-sync.txt');
fs.appendFileSync(filename, data);
diff --git a/test/parallel/test-fs-append-file.js b/test/parallel/test-fs-append-file.js
index 20cba235f0..3122982e2a 100644
--- a/test/parallel/test-fs-append-file.js
+++ b/test/parallel/test-fs-append-file.js
@@ -68,7 +68,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); };
.catch(throwNextTick);
}
-// test that appends data to a non-empty file (callback API)
+// Test that appends data to a non-empty file (callback API)
{
const filename = join(tmpdir.path, 'append-non-empty.txt');
fs.writeFileSync(filename, currentFileData);
@@ -84,7 +84,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); };
}));
}
-// test that appends data to a non-empty file (promise API)
+// Test that appends data to a non-empty file (promise API)
{
const filename = join(tmpdir.path, 'append-non-empty-promise.txt');
fs.writeFileSync(filename, currentFileData);
@@ -98,7 +98,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); };
.catch(throwNextTick);
}
-// test that appendFile accepts buffers (callback API)
+// Test that appendFile accepts buffers (callback API)
{
const filename = join(tmpdir.path, 'append-buffer.txt');
fs.writeFileSync(filename, currentFileData);
@@ -115,7 +115,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); };
}));
}
-// test that appendFile accepts buffers (promises API)
+// Test that appendFile accepts buffers (promises API)
{
const filename = join(tmpdir.path, 'append-buffer-promises.txt');
fs.writeFileSync(filename, currentFileData);
@@ -130,7 +130,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); };
.catch(throwNextTick);
}
-// test that appendFile accepts numbers (callback API)
+// Test that appendFile accepts numbers (callback API)
{
const filename = join(tmpdir.path, 'append-numbers.txt');
fs.writeFileSync(filename, currentFileData);
@@ -153,7 +153,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); };
}));
}
-// test that appendFile accepts numbers (promises API)
+// Test that appendFile accepts numbers (promises API)
{
const filename = join(tmpdir.path, 'append-numbers-promises.txt');
fs.writeFileSync(filename, currentFileData);
@@ -176,7 +176,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); };
.catch(throwNextTick);
}
-// test that appendFile accepts file descriptors (callback API)
+// Test that appendFile accepts file descriptors (callback API)
{
const filename = join(tmpdir.path, 'append-descriptors.txt');
fs.writeFileSync(filename, currentFileData);
@@ -200,7 +200,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); };
}));
}
-// test that appendFile accepts file descriptors (promises API)
+// Test that appendFile accepts file descriptors (promises API)
{
const filename = join(tmpdir.path, 'append-descriptors-promises.txt');
fs.writeFileSync(filename, currentFileData);
diff --git a/test/parallel/test-fs-non-number-arguments-throw.js b/test/parallel/test-fs-non-number-arguments-throw.js
index 61ed3f6c28..4f85229cf5 100644
--- a/test/parallel/test-fs-non-number-arguments-throw.js
+++ b/test/parallel/test-fs-non-number-arguments-throw.js
@@ -10,7 +10,7 @@ const tempFile = path.join(tmpdir.path, 'fs-non-number-arguments-throw');
tmpdir.refresh();
fs.writeFileSync(tempFile, 'abc\ndef');
-// a sanity check when using numbers instead of strings
+// A sanity check when using numbers instead of strings
const sanity = 'def';
const saneEmitter = fs.createReadStream(tempFile, { start: 4, end: 6 });
diff --git a/test/parallel/test-fs-null-bytes.js b/test/parallel/test-fs-null-bytes.js
index f5a56b01d5..25f74d6e54 100644
--- a/test/parallel/test-fs-null-bytes.js
+++ b/test/parallel/test-fs-null-bytes.js
@@ -148,8 +148,8 @@ check(null, fs.watch, fileUrl2, assert.fail);
check(null, fs.watchFile, fileUrl2, assert.fail);
check(fs.writeFile, fs.writeFileSync, fileUrl2, 'abc');
-// an 'error' for exists means that it doesn't exist.
-// one of many reasons why this file is the absolute worst.
+// An 'error' for exists means that it doesn't exist.
+// One of many reasons why this file is the absolute worst.
fs.exists('foo\u0000bar', common.mustCall((exists) => {
assert(!exists);
}));
diff --git a/test/parallel/test-fs-promises-file-handle-chmod.js b/test/parallel/test-fs-promises-file-handle-chmod.js
index 6b51639d41..cb7a1c6317 100644
--- a/test/parallel/test-fs-promises-file-handle-chmod.js
+++ b/test/parallel/test-fs-promises-file-handle-chmod.js
@@ -25,10 +25,10 @@ async function validateFilePermission() {
const newPermissions = 0o765;
if (common.isWindows) {
- // chmod in Windows will only toggle read only/write access. the
+ // Chmod in Windows will only toggle read only/write access. The
// fs.Stats.mode in Windows is computed using read/write
- // bits (not exec). read only at best returns 444; r/w 666.
- // refer: /deps/uv/src/win/fs.cfs;
+ // bits (not exec). Read-only at best returns 444; r/w 666.
+ // Refer: /deps/uv/src/win/fs.cfs;
expectedAccess = 0o664;
} else {
expectedAccess = newPermissions;
diff --git a/test/parallel/test-fs-promises.js b/test/parallel/test-fs-promises.js
index 6b8fe3bb25..c4143fbb9b 100644
--- a/test/parallel/test-fs-promises.js
+++ b/test/parallel/test-fs-promises.js
@@ -106,7 +106,7 @@ async function getHandle(dest) {
await handle.sync();
}
- // test fs.read promises when length to read is zero bytes
+ // Test fs.read promises when length to read is zero bytes
{
const dest = path.resolve(tmpDir, 'test1.js');
const handle = await getHandle(dest);
diff --git a/test/parallel/test-fs-realpath-on-substed-drive.js b/test/parallel/test-fs-realpath-on-substed-drive.js
index 4f4181a4ae..1c86dc3649 100644
--- a/test/parallel/test-fs-realpath-on-substed-drive.js
+++ b/test/parallel/test-fs-realpath-on-substed-drive.js
@@ -25,7 +25,7 @@ for (i = 0; i < driveLetters.length; ++i) {
if (i === driveLetters.length)
common.skip('Cannot create subst drive');
-// schedule cleanup (and check if all callbacks where called)
+// Schedule cleanup (and check if all callbacks where called)
process.on('exit', function() {
spawnSync('subst', ['/d', drive]);
});
diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js
index 5c1c0cd962..1eaf1681d7 100644
--- a/test/parallel/test-fs-realpath.js
+++ b/test/parallel/test-fs-realpath.js
@@ -115,7 +115,7 @@ function test_simple_relative_symlink(realpath, realpathSync, callback) {
function test_simple_absolute_symlink(realpath, realpathSync, callback) {
console.log('test_simple_absolute_symlink');
- // this one should still run, even if skipSymlinks is set,
+ // This one should still run, even if skipSymlinks is set,
// because it uses a junction.
const type = skipSymlinks ? 'junction' : 'dir';
@@ -418,7 +418,7 @@ function test_up_multiple(realpath, realpathSync, cb) {
function test_abs_with_kids(realpath, realpathSync, cb) {
console.log('test_abs_with_kids');
- // this one should still run, even if skipSymlinks is set,
+ // This one should still run, even if skipSymlinks is set,
// because it uses a junction.
const type = skipSymlinks ? 'junction' : 'dir';
diff --git a/test/parallel/test-fs-utimes.js b/test/parallel/test-fs-utimes.js
index 4c13fc4659..bed403dc2d 100644
--- a/test/parallel/test-fs-utimes.js
+++ b/test/parallel/test-fs-utimes.js
@@ -195,7 +195,7 @@ if (!process.arch.includes('arm') && !common.isOpenBSD && !common.isSunOS) {
}
if (common.isWindows) {
- // this value would get converted to (double)1713037251359.9998
+ // This value would get converted to (double)1713037251359.9998
const truncate_mtime = 1713037251360;
fs.utimesSync(path, truncate_mtime / 1000, truncate_mtime / 1000);
const truncate_stats = fs.statSync(path);
diff --git a/test/parallel/test-fs-whatwg-url.js b/test/parallel/test-fs-whatwg-url.js
index 159fc0cc1b..91c5c39637 100644
--- a/test/parallel/test-fs-whatwg-url.js
+++ b/test/parallel/test-fs-whatwg-url.js
@@ -42,7 +42,7 @@ common.expectsError(
// pct-encoded characters in the path will be decoded and checked
if (common.isWindows) {
- // encoded back and forward slashes are not permitted on windows
+ // Encoded back and forward slashes are not permitted on windows
['%2f', '%2F', '%5c', '%5C'].forEach((i) => {
common.expectsError(
() => {
@@ -67,7 +67,7 @@ if (common.isWindows) {
}
);
} else {
- // encoded forward slashes are not permitted on other platforms
+ // Encoded forward slashes are not permitted on other platforms
['%2f', '%2F'].forEach((i) => {
common.expectsError(
() => {
diff --git a/test/parallel/test-handle-wrap-isrefed.js b/test/parallel/test-handle-wrap-isrefed.js
index 421bf696b1..2fb766ce72 100644
--- a/test/parallel/test-handle-wrap-isrefed.js
+++ b/test/parallel/test-handle-wrap-isrefed.js
@@ -107,4 +107,4 @@ const { kStateSymbol } = require('internal/dgram');
}
-// see also test/pseudo-tty/test-handle-wrap-isrefed-tty.js
+// See also test/pseudo-tty/test-handle-wrap-isrefed-tty.js
diff --git a/test/parallel/test-http-addrequest-localaddress.js b/test/parallel/test-http-addrequest-localaddress.js
index fce53c88af..ce2ae8d12e 100644
--- a/test/parallel/test-http-addrequest-localaddress.js
+++ b/test/parallel/test-http-addrequest-localaddress.js
@@ -8,7 +8,7 @@ require('../common');
const assert = require('assert');
const agent = require('http').globalAgent;
-// small stub just so we can call addRequest directly
+// Small stub just so we can call addRequest directly
const req = {
getHeader: () => {}
};
diff --git a/test/parallel/test-http-agent-destroyed-socket.js b/test/parallel/test-http-agent-destroyed-socket.js
index af63a676f6..7dbc1db9f9 100644
--- a/test/parallel/test-http-agent-destroyed-socket.js
+++ b/test/parallel/test-http-agent-destroyed-socket.js
@@ -52,7 +52,7 @@ const server = http.createServer(common.mustCall((req, res) => {
// assert request2 was removed from the queue
assert(!agent.requests[key]);
process.nextTick(() => {
- // assert that the same socket was not assigned to request2,
+ // Assert that the same socket was not assigned to request2,
// since it was destroyed.
assert.notStrictEqual(request1.socket, request2.socket);
assert(!request2.socket.destroyed, 'the socket is destroyed');
@@ -64,7 +64,7 @@ const server = http.createServer(common.mustCall((req, res) => {
const request2 = http.get(requestOptions, common.mustCall((response) => {
assert(!request2.socket.destroyed);
assert(request1.socket.destroyed);
- // assert not reusing the same socket, since it was destroyed.
+ // Assert not reusing the same socket, since it was destroyed.
assert.notStrictEqual(request1.socket, request2.socket);
const countdown = new Countdown(2, () => server.close());
request2.socket.on('close', common.mustCall(() => countdown.dec()));
diff --git a/test/parallel/test-http-client-pipe-end.js b/test/parallel/test-http-client-pipe-end.js
index 9dcdbe4a49..9aa645b12a 100644
--- a/test/parallel/test-http-client-pipe-end.js
+++ b/test/parallel/test-http-client-pipe-end.js
@@ -50,7 +50,7 @@ server.listen(common.PIPE, function() {
sched(function() { req.end(); }, 5);
});
-// schedule a callback after `ticks` event loop ticks
+// Schedule a callback after `ticks` event loop ticks
function sched(cb, ticks) {
function fn() {
if (--ticks)
diff --git a/test/parallel/test-http-client-spurious-aborted.js b/test/parallel/test-http-client-spurious-aborted.js
index 58a2f92de9..8f05f0cb36 100644
--- a/test/parallel/test-http-client-spurious-aborted.js
+++ b/test/parallel/test-http-client-spurious-aborted.js
@@ -52,7 +52,7 @@ function download() {
_handle._close = res.socket._handle.close;
_handle.close = function(callback) {
_handle._close();
- // set readable to true even though request is complete
+ // Set readable to true even though request is complete
if (res.complete) res.readable = true;
callback();
};
diff --git a/test/parallel/test-http-client-timeout-agent.js b/test/parallel/test-http-client-timeout-agent.js
index 2f4aeed975..154f788c18 100644
--- a/test/parallel/test-http-client-timeout-agent.js
+++ b/test/parallel/test-http-client-timeout-agent.js
@@ -89,6 +89,6 @@ server.listen(0, options.host, function() {
process.on('exit', () => {
console.error(`done=${requests_done} sent=${requests_sent}`);
- // check that timeout on http request was not called too much
+ // Check that timeout on http request was not called too much
assert.strictEqual(requests_done, requests_sent);
});
diff --git a/test/parallel/test-http-connect-req-res.js b/test/parallel/test-http-connect-req-res.js
index 5db19aedde..893c621852 100644
--- a/test/parallel/test-http-connect-req-res.js
+++ b/test/parallel/test-http-connect-req-res.js
@@ -51,7 +51,7 @@ server.listen(0, common.mustCall(function() {
let data = firstBodyChunk.toString();
- // test that the firstBodyChunk was not parsed as HTTP
+ // Test that the firstBodyChunk was not parsed as HTTP
assert.strictEqual(data, 'Head');
socket.on('data', function(buf) {
diff --git a/test/parallel/test-http-outgoing-finish.js b/test/parallel/test-http-outgoing-finish.js
index c805a89cc1..1fcd7cd076 100644
--- a/test/parallel/test-http-outgoing-finish.js
+++ b/test/parallel/test-http-outgoing-finish.js
@@ -51,7 +51,7 @@ function write(out) {
// first, write until it gets some backpressure
while (out.write(buf)) {}
- // now end, and make sure that we don't get the 'finish' event
+ // Now end, and make sure that we don't get the 'finish' event
// before the tick where the cb gets called. We give it until
// nextTick because this is added as a listener before the endcb
// is registered. The order is not what we're testing here, just
diff --git a/test/parallel/test-http-remove-header-stays-removed.js b/test/parallel/test-http-remove-header-stays-removed.js
index 09a4475388..3885ebd905 100644
--- a/test/parallel/test-http-remove-header-stays-removed.js
+++ b/test/parallel/test-http-remove-header-stays-removed.js
@@ -32,7 +32,7 @@ const server = http.createServer(function(request, response) {
response.removeHeader('transfer-encoding');
response.removeHeader('content-length');
- // make sure that removing and then setting still works:
+ // Make sure that removing and then setting still works:
response.removeHeader('date');
response.setHeader('date', 'coffee o clock');
diff --git a/test/parallel/test-http-request-dont-override-options.js b/test/parallel/test-http-request-dont-override-options.js
index ff534436cb..19b847dc03 100644
--- a/test/parallel/test-http-request-dont-override-options.js
+++ b/test/parallel/test-http-request-dont-override-options.js
@@ -14,7 +14,7 @@ server.listen(0, function() {
const agent = new http.Agent();
agent.defaultPort = this.address().port;
- // options marked as explicitly undefined for readability
+ // Options marked as explicitly undefined for readability
// in this test, they should STAY undefined as options should not
// be mutable / modified
const options = {
diff --git a/test/parallel/test-http-response-multiheaders.js b/test/parallel/test-http-response-multiheaders.js
index f9429cff93..31cb59546c 100644
--- a/test/parallel/test-http-response-multiheaders.js
+++ b/test/parallel/test-http-response-multiheaders.js
@@ -51,7 +51,7 @@ const server = http.createServer(function(req, res) {
server.listen(0, common.mustCall(function() {
const countdown = new Countdown(runCount, () => server.close());
for (let n = 1; n <= runCount; n++) {
- // this runs twice, the first time, the server will use
+ // This runs twice, the first time, the server will use
// setHeader, the second time it uses writeHead. The
// result on the client side should be the same in
// either case -- only the first instance of the header
diff --git a/test/parallel/test-http-server-multiheaders2.js b/test/parallel/test-http-server-multiheaders2.js
index bb0fe0eaca..a8878d2951 100644
--- a/test/parallel/test-http-server-multiheaders2.js
+++ b/test/parallel/test-http-server-multiheaders2.js
@@ -47,7 +47,7 @@ const multipleAllowed = [
// not a special case, just making sure it's parsed correctly
'X-Forwarded-For',
- // make sure that unspecified headers is treated as multiple
+ // Make sure that unspecified headers is treated as multiple
'Some-Random-Header',
'X-Some-Random-Header',
];
diff --git a/test/parallel/test-http-server-response-standalone.js b/test/parallel/test-http-server-response-standalone.js
index 7025c734b3..a50974d2d3 100644
--- a/test/parallel/test-http-server-response-standalone.js
+++ b/test/parallel/test-http-server-response-standalone.js
@@ -5,7 +5,7 @@ const { ServerResponse } = require('http');
const { Writable } = require('stream');
const assert = require('assert');
-// check that ServerResponse can be used without a proper Socket
+// Check that ServerResponse can be used without a proper Socket
// Fixes: https://github.com/nodejs/node/issues/14386
// Fixes: https://github.com/nodejs/node/issues/14381
diff --git a/test/parallel/test-http-url.parse-basic.js b/test/parallel/test-http-url.parse-basic.js
index a6ecd3918f..c900d045d3 100644
--- a/test/parallel/test-http-url.parse-basic.js
+++ b/test/parallel/test-http-url.parse-basic.js
@@ -31,7 +31,7 @@ let testURL;
function check(request) {
// default method should still be get
assert.strictEqual(request.method, 'GET');
- // there are no URL params, so you should not see any
+ // There are no URL params, so you should not see any
assert.strictEqual(request.url, '/');
// the host header should use the url.parse.hostname
assert.strictEqual(request.headers.host,
diff --git a/test/parallel/test-http-wget.js b/test/parallel/test-http-wget.js
index ef06deefdf..f576f6ad60 100644
--- a/test/parallel/test-http-wget.js
+++ b/test/parallel/test-http-wget.js
@@ -25,7 +25,7 @@ const assert = require('assert');
const net = require('net');
const http = require('http');
-// wget sends an HTTP/1.0 request with Connection: Keep-Alive
+// `wget` sends an HTTP/1.0 request with Connection: Keep-Alive
//
// Sending back a chunked response to an HTTP/1.0 client would be wrong,
// so what has to happen in this case is that the connection is closed
diff --git a/test/parallel/test-http-write-callbacks.js b/test/parallel/test-http-write-callbacks.js
index 401017592b..a4f23e12cb 100644
--- a/test/parallel/test-http-write-callbacks.js
+++ b/test/parallel/test-http-write-callbacks.js
@@ -91,7 +91,7 @@ server.listen(0, function() {
});
});
req.on('response', (res) => {
- // this should not come until after the end is flushed out
+ // This should not come until after the end is flushed out
assert(clientEndCb);
res.setEncoding('ascii');
res.on('data', (c) => {
diff --git a/test/parallel/test-http-zero-length-write.js b/test/parallel/test-http-zero-length-write.js
index 35a1b616d7..f765ad0545 100644
--- a/test/parallel/test-http-zero-length-write.js
+++ b/test/parallel/test-http-zero-length-write.js
@@ -32,7 +32,7 @@ function getSrc() {
// The Readable class prevents this behavior.
const src = new Stream();
- // start out paused, just so we don't miss anything yet.
+ // Start out paused, just so we don't miss anything yet.
let paused = false;
src.pause = function() {
paused = true;
diff --git a/test/parallel/test-http2-altsvc.js b/test/parallel/test-http2-altsvc.js
index d4216e973d..8b2e5b4690 100644
--- a/test/parallel/test-http2-altsvc.js
+++ b/test/parallel/test-http2-altsvc.js
@@ -88,7 +88,7 @@ server.on('session', common.mustCall((session) => {
);
});
- // arguments + origin are too long for an ALTSVC frame
+ // Arguments + origin are too long for an ALTSVC frame
assert.throws(
() => {
session.altsvc('h2=":8000"',
diff --git a/test/parallel/test-http2-client-set-priority.js b/test/parallel/test-http2-client-set-priority.js
index 64b7b56dfa..411b762be8 100644
--- a/test/parallel/test-http2-client-set-priority.js
+++ b/test/parallel/test-http2-client-set-priority.js
@@ -36,9 +36,9 @@ checkWeight(1, 1);
checkWeight(16, 16);
checkWeight(256, 256);
-// when client weight is higher than 256, weight is 256
+// When client weight is higher than 256, weight is 256
checkWeight(257, 256);
checkWeight(512, 256);
-// when client weight is undefined, weight is default 16
+// When client weight is undefined, weight is default 16
checkWeight(undefined, 16);
diff --git a/test/parallel/test-http2-compat-expect-continue-check.js b/test/parallel/test-http2-compat-expect-continue-check.js
index 4f2514a44a..0f38e6ae1f 100644
--- a/test/parallel/test-http2-compat-expect-continue-check.js
+++ b/test/parallel/test-http2-compat-expect-continue-check.js
@@ -20,7 +20,7 @@ server.on('checkContinue', common.mustCall((req, res) => {
res.writeContinue();
res.writeHead(200, {});
res.end(testResBody);
- // should simply return false if already too late to write
+ // Should simply return false if already too late to write
assert.strictEqual(res.writeContinue(), false);
res.on('finish', common.mustCall(
() => process.nextTick(() => assert.strictEqual(res.writeContinue(), false))
diff --git a/test/parallel/test-http2-compat-serverrequest-pause.js b/test/parallel/test-http2-compat-serverrequest-pause.js
index 9c81e8ff61..2abc9e3da4 100644
--- a/test/parallel/test-http2-compat-serverrequest-pause.js
+++ b/test/parallel/test-http2-compat-serverrequest-pause.js
@@ -26,7 +26,7 @@ server.on('request', common.mustCall((req, res) => {
res.end();
}));
- // shouldn't throw if underlying Http2Stream no longer exists
+ // Shouldn't throw if underlying Http2Stream no longer exists
res.on('finish', common.mustCall(() => process.nextTick(() => {
req.pause();
req.resume();
diff --git a/test/parallel/test-http2-compat-serverrequest-pipe.js b/test/parallel/test-http2-compat-serverrequest-pipe.js
index f588907306..a02a64cdc0 100644
--- a/test/parallel/test-http2-compat-serverrequest-pipe.js
+++ b/test/parallel/test-http2-compat-serverrequest-pipe.js
@@ -9,7 +9,7 @@ const http2 = require('http2');
const fs = require('fs');
const path = require('path');
-// piping should work as expected with createWriteStream
+// Piping should work as expected with createWriteStream
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
diff --git a/test/parallel/test-http2-compat-socket.js b/test/parallel/test-http2-compat-socket.js
index 5b61f27bb2..162d3af96f 100644
--- a/test/parallel/test-http2-compat-socket.js
+++ b/test/parallel/test-http2-compat-socket.js
@@ -43,7 +43,7 @@ server.on('request', common.mustCall(function(request, response) {
common.expectsError(() => request.socket.pause(), errMsg);
common.expectsError(() => request.socket.resume(), errMsg);
- // should have correct this context for socket methods & getters
+ // Should have correct this context for socket methods & getters
assert.ok(request.socket.address() != null);
assert.ok(request.socket.remotePort);
@@ -66,7 +66,7 @@ server.on('request', common.mustCall(function(request, response) {
assert.ok(request.socket._server);
assert.strictEqual(request.socket.connecting, false);
- // socket events are bound and emitted on Http2Stream
+ // Socket events are bound and emitted on Http2Stream
request.socket.on('close', common.mustCall());
request.socket.once('close', common.mustCall());
request.socket.on('testEvent', common.mustCall());
diff --git a/test/parallel/test-http2-connect.js b/test/parallel/test-http2-connect.js
index b93faf9d93..6080dcb90e 100644
--- a/test/parallel/test-http2-connect.js
+++ b/test/parallel/test-http2-connect.js
@@ -63,7 +63,7 @@ const { connect: netConnect } = require('net');
connect(authority).on('error', () => {});
}
-// check for error for an invalid protocol (not http or https)
+// Check for error for an invalid protocol (not http or https)
{
const authority = 'ssh://localhost';
expectsError(() => {
diff --git a/test/parallel/test-http2-dont-override.js b/test/parallel/test-http2-dont-override.js
index b45713deb3..3f87e14be1 100644
--- a/test/parallel/test-http2-dont-override.js
+++ b/test/parallel/test-http2-dont-override.js
@@ -10,7 +10,7 @@ const options = {};
const server = http2.createServer(options);
-// options are defaulted but the options are not modified
+// Options are defaulted but the options are not modified
assert.deepStrictEqual(Object.keys(options), []);
server.on('stream', common.mustCall((stream) => {
diff --git a/test/parallel/test-http2-pipe.js b/test/parallel/test-http2-pipe.js
index 2e564d3e32..e081c6d6d7 100644
--- a/test/parallel/test-http2-pipe.js
+++ b/test/parallel/test-http2-pipe.js
@@ -9,7 +9,7 @@ const http2 = require('http2');
const fs = require('fs');
const path = require('path');
-// piping should work as expected with createWriteStream
+// Piping should work as expected with createWriteStream
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
diff --git a/test/parallel/test-http2-respond-file-304.js b/test/parallel/test-http2-respond-file-304.js
index 536c48c624..12136d65fa 100644
--- a/test/parallel/test-http2-respond-file-304.js
+++ b/test/parallel/test-http2-respond-file-304.js
@@ -20,7 +20,7 @@ server.on('stream', (stream) => {
[HTTP2_HEADER_CONTENT_TYPE]: 'text/plain'
}, {
statCheck(stat, headers) {
- // abort the send and return a 304 Not Modified instead
+ // Abort the send and return a 304 Not Modified instead
stream.respond({ [HTTP2_HEADER_STATUS]: 304 });
return false;
}
diff --git a/test/parallel/test-http2-timeouts.js b/test/parallel/test-http2-timeouts.js
index db5822776a..de8311a149 100644
--- a/test/parallel/test-http2-timeouts.js
+++ b/test/parallel/test-http2-timeouts.js
@@ -14,7 +14,7 @@ server.on('stream', common.mustCall((stream) => {
stream.end('hello world');
}));
- // check that expected errors are thrown with wrong args
+ // Check that expected errors are thrown with wrong args
common.expectsError(
() => stream.setTimeout('100'),
{
diff --git a/test/parallel/test-https-agent-create-connection.js b/test/parallel/test-https-agent-create-connection.js
index 5dcf73cc76..c174f90d7d 100644
--- a/test/parallel/test-https-agent-create-connection.js
+++ b/test/parallel/test-https-agent-create-connection.js
@@ -89,7 +89,7 @@ function createServer() {
}));
}
-// use port and host and option does not have agentKey
+// Use port and host and option does not have agentKey
{
const server = createServer();
server.listen(0, common.mustCall(() => {
diff --git a/test/parallel/test-https-argument-of-creating.js b/test/parallel/test-https-argument-of-creating.js
index 1154f968d7..c46dd204c5 100644
--- a/test/parallel/test-https-argument-of-creating.js
+++ b/test/parallel/test-https-argument-of-creating.js
@@ -35,7 +35,7 @@ const dftProtocol = {};
}
-// validate that `createServer` can work with no arguments
+// Validate that `createServer` can work with no arguments
{
const server = https.createServer();
diff --git a/test/parallel/test-https-client-get-url.js b/test/parallel/test-https-client-get-url.js
index 5d520416fe..76328775e8 100644
--- a/test/parallel/test-https-client-get-url.js
+++ b/test/parallel/test-https-client-get-url.js
@@ -25,7 +25,7 @@ const fixtures = require('../common/fixtures');
if (!common.hasCrypto)
common.skip('missing crypto');
-// disable strict server certificate validation by the client
+// Disable strict server certificate validation by the client
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
const assert = require('assert');
diff --git a/test/parallel/test-https-slow-headers.js b/test/parallel/test-https-slow-headers.js
index 2a55850b5d..531d9ad318 100644
--- a/test/parallel/test-https-slow-headers.js
+++ b/test/parallel/test-https-slow-headers.js
@@ -30,7 +30,7 @@ let sendCharEvery = 1000;
// 40 seconds is the default
assert.strictEqual(server.headersTimeout, 40 * 1000);
-// pass a REAL env variable to shortening up the default
+// Pass a REAL env variable to shortening up the default
// value which is 40s otherwise
// this is useful for manual testing
if (!process.env.REAL) {
diff --git a/test/parallel/test-https-strict.js b/test/parallel/test-https-strict.js
index 0e8f725a5d..6c1d6325ea 100644
--- a/test/parallel/test-https-strict.js
+++ b/test/parallel/test-https-strict.js
@@ -25,7 +25,7 @@ const fixtures = require('../common/fixtures');
if (!common.hasCrypto)
common.skip('missing crypto');
-// disable strict server certificate validation by the client
+// Disable strict server certificate validation by the client
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
common.expectWarning(
diff --git a/test/parallel/test-https-truncate.js b/test/parallel/test-https-truncate.js
index 1a14cf5408..beed36cd7c 100644
--- a/test/parallel/test-https-truncate.js
+++ b/test/parallel/test-https-truncate.js
@@ -32,7 +32,7 @@ const https = require('https');
const key = fixtures.readKey('agent1-key.pem');
const cert = fixtures.readKey('agent1-cert.pem');
-// number of bytes discovered empirically to trigger the bug
+// Number of bytes discovered empirically to trigger the bug
const data = Buffer.alloc(1024 * 32 + 1);
httpsTest();
diff --git a/test/parallel/test-listen-fd-detached-inherit.js b/test/parallel/test-listen-fd-detached-inherit.js
index e0fc25134c..9f672a9a55 100644
--- a/test/parallel/test-listen-fd-detached-inherit.js
+++ b/test/parallel/test-listen-fd-detached-inherit.js
@@ -64,8 +64,8 @@ function test() {
s += c.toString();
});
res.on('end', function() {
- // kill the subprocess before we start doing asserts.
- // it's really annoying when tests leave orphans!
+ // Kill the subprocess before we start doing asserts.
+ // It's really annoying when tests leave orphans!
process.kill(child.pid, 'SIGKILL');
try {
parent.kill();
diff --git a/test/parallel/test-listen-fd-detached.js b/test/parallel/test-listen-fd-detached.js
index eec12132a1..d2fa770719 100644
--- a/test/parallel/test-listen-fd-detached.js
+++ b/test/parallel/test-listen-fd-detached.js
@@ -64,7 +64,7 @@ function test() {
s += c.toString();
});
res.on('end', function() {
- // kill the subprocess before we start doing asserts.
+ // Kill the subprocess before we start doing asserts.
// it's really annoying when tests leave orphans!
process.kill(child.pid, 'SIGKILL');
try {
diff --git a/test/parallel/test-module-version.js b/test/parallel/test-module-version.js
index 04f011bbfa..61b84914e2 100644
--- a/test/parallel/test-module-version.js
+++ b/test/parallel/test-module-version.js
@@ -5,6 +5,6 @@ const assert = require('assert');
// check for existence
assert(process.config.variables.hasOwnProperty('node_module_version'));
-// ensure that `node_module_version` is an Integer > 0
+// Ensure that `node_module_version` is an Integer > 0
assert(Number.isInteger(process.config.variables.node_module_version));
assert(process.config.variables.node_module_version > 0);
diff --git a/test/parallel/test-net-connect-immediate-finish.js b/test/parallel/test-net-connect-immediate-finish.js
index 27d988ab5a..29256ceb8d 100644
--- a/test/parallel/test-net-connect-immediate-finish.js
+++ b/test/parallel/test-net-connect-immediate-finish.js
@@ -38,7 +38,7 @@ const {
const client = net.connect({
host: addresses.INVALID_HOST,
- port: 80, // port number doesn't matter because host name is invalid
+ port: 80, // Port number doesn't matter because host name is invalid
lookup: common.mustCall(errorLookupMock())
}, common.mustNotCall());
diff --git a/test/parallel/test-net-connect-options-allowhalfopen.js b/test/parallel/test-net-connect-options-allowhalfopen.js
index 509b33ec4c..ed615dcf2c 100644
--- a/test/parallel/test-net-connect-options-allowhalfopen.js
+++ b/test/parallel/test-net-connect-options-allowhalfopen.js
@@ -67,7 +67,7 @@ const net = require('net');
client.resume();
client.on('end', common.mustCall(function clientOnEnd() {
setTimeout(function closeServer() {
- // when allowHalfOpen is true, client must still be writable
+ // When allowHalfOpen is true, client must still be writable
// after the server closes the connections, but not readable
console.log(`client ${index} received FIN`);
assert(!client.readable);
diff --git a/test/parallel/test-net-timeout-no-handle.js b/test/parallel/test-net-timeout-no-handle.js
index 539f661cae..b6baf891af 100644
--- a/test/parallel/test-net-timeout-no-handle.js
+++ b/test/parallel/test-net-timeout-no-handle.js
@@ -13,5 +13,5 @@ socket.on('timeout', common.mustCall(() => {
socket.on('connect', common.mustNotCall());
-// since the timeout is unrefed, the code will exit without this
+// Since the timeout is unrefed, the code will exit without this
setTimeout(() => {}, common.platformTimeout(200));
diff --git a/test/parallel/test-next-tick-intentional-starvation.js b/test/parallel/test-next-tick-intentional-starvation.js
index 26d07e02ea..ed357cb233 100644
--- a/test/parallel/test-next-tick-intentional-starvation.js
+++ b/test/parallel/test-next-tick-intentional-starvation.js
@@ -23,7 +23,7 @@
require('../common');
const assert = require('assert');
-// this is the inverse of test-next-tick-starvation. it verifies
+// This is the inverse of test-next-tick-starvation. it verifies
// that process.nextTick will *always* come before other events
let ran = false;
diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js
index ca10665b26..9672e82c7f 100644
--- a/test/parallel/test-path.js
+++ b/test/parallel/test-path.js
@@ -48,7 +48,7 @@ typeErrorTests.forEach((test) => {
fail(namespace.basename, test);
fail(namespace.extname, test);
- // undefined is a valid value as the second argument to basename
+ // Undefined is a valid value as the second argument to basename
if (test !== undefined) {
fail(namespace.basename, 'foo', test);
}
diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js
index 8a2b56666d..71c282b9fb 100644
--- a/test/parallel/test-preload.js
+++ b/test/parallel/test-preload.js
@@ -100,7 +100,7 @@ replProc.on('close', function(code) {
assert.strictEqual(replStdout, output);
});
-// test that preload placement at other points in the cmdline
+// Test that preload placement at other points in the cmdline
// also test that duplicated preload only gets loaded once
childProcess.exec(
`"${nodeBinary}" ${preloadOption([fixtureA])}-e "console.log('hello');" ${
diff --git a/test/parallel/test-process-emitwarning.js b/test/parallel/test-process-emitwarning.js
index e51d391a7b..bba41c56e2 100644
--- a/test/parallel/test-process-emitwarning.js
+++ b/test/parallel/test-process-emitwarning.js
@@ -38,7 +38,7 @@ class CustomWarning extends Error {
[testMsg, { type: testType, code: testCode }],
[testMsg, { type: testType, code: testCode, detail: testDetail }],
[new CustomWarning()],
- // detail will be ignored for the following. No errors thrown
+ // Detail will be ignored for the following. No errors thrown
[testMsg, { type: testType, code: testCode, detail: true }],
[testMsg, { type: testType, code: testCode, detail: [] }],
[testMsg, { type: testType, code: testCode, detail: null }],
diff --git a/test/parallel/test-process-env-allowed-flags.js b/test/parallel/test-process-env-allowed-flags.js
index a2c9bfc4d6..dfa2129b26 100644
--- a/test/parallel/test-process-env-allowed-flags.js
+++ b/test/parallel/test-process-env-allowed-flags.js
@@ -56,7 +56,7 @@ require('../common');
});
}
-// assert immutability of process.allowedNodeEnvironmentFlags
+// Assert immutability of process.allowedNodeEnvironmentFlags
{
assert.strictEqual(Object.isFrozen(process.allowedNodeEnvironmentFlags),
true);
diff --git a/test/parallel/test-process-env.js b/test/parallel/test-process-env.js
index d146d5c616..e1be9c6e1b 100644
--- a/test/parallel/test-process-env.js
+++ b/test/parallel/test-process-env.js
@@ -24,7 +24,7 @@
const common = require('../common');
const assert = require('assert');
-// changes in environment should be visible to child processes
+// Changes in environment should be visible to child processes
if (process.argv[2] === 'you-are-the-child') {
assert.strictEqual('NODE_PROCESS_ENV_DELETED' in process.env, false);
assert.strictEqual(process.env.NODE_PROCESS_ENV, '42');
diff --git a/test/parallel/test-promises-unhandled-rejections.js b/test/parallel/test-promises-unhandled-rejections.js
index 4464fad8e4..176bae8a73 100644
--- a/test/parallel/test-promises-unhandled-rejections.js
+++ b/test/parallel/test-promises-unhandled-rejections.js
@@ -286,7 +286,7 @@ asyncTest('While inside setImmediate, catching a rejected promise derived ' +
onUnhandledFail(done);
setImmediate(function() {
- // reproduces on first tick and inside of setImmediate
+ // Reproduces on first tick and inside of setImmediate
Promise
.resolve('resolve')
.then(function() {
diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js
index b5a4a599c3..72594ce719 100644
--- a/test/parallel/test-querystring.js
+++ b/test/parallel/test-querystring.js
@@ -214,7 +214,7 @@ qsColonTestCases.forEach((testCase) => {
check(qs.parse(testCase[0], ';', ':'), testCase[2], testCase[0]);
});
-// test the weird objects, that they get parsed properly
+// Test the weird objects, that they get parsed properly
qsWeirdObjects.forEach((testCase) => {
check(qs.parse(testCase[1]), testCase[2], testCase[1]);
});
diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js
index 408d70e788..87547a9b6a 100644
--- a/test/parallel/test-readline-interface.js
+++ b/test/parallel/test-readline-interface.js
@@ -154,7 +154,7 @@ function isWarned(emitter) {
rli.close();
}
- // sending a single character with no newline and then a newline
+ // Sending a single character with no newline and then a newline
{
const fi = new FakeInput();
const rli = new readline.Interface(
@@ -368,7 +368,7 @@ function isWarned(emitter) {
});
}
- // constructor throws if historySize is not a positive number
+ // Constructor throws if historySize is not a positive number
{
const fi = new FakeInput();
common.expectsError(function() {
@@ -472,7 +472,7 @@ function isWarned(emitter) {
rli.close();
}
- // sending a multi-byte utf8 char over multiple writes
+ // Sending a multi-byte utf8 char over multiple writes
{
const buf = Buffer.from('☮', 'utf8');
const fi = new FakeInput();
diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js
index 9edebe9036..69011e4af8 100644
--- a/test/parallel/test-repl-tab-complete.js
+++ b/test/parallel/test-repl-tab-complete.js
@@ -160,7 +160,7 @@ testMe.complete('inner.o', common.mustCall(function(error, data) {
putIn.run(['.clear']);
-// currently does not work, but should not break, not the {
+// Currently does not work, but should not break, not the {
putIn.run([
'var top = function() {',
'r = function test ()',
@@ -213,7 +213,7 @@ testMe.complete('toSt', common.mustCall(function(error, data) {
assert.deepStrictEqual(data, [['toString'], 'toSt']);
}));
-// own properties should shadow properties on the prototype
+// Own properties should shadow properties on the prototype
putIn.run(['.clear']);
putIn.run([
'var x = Object.create(null);',
diff --git a/test/parallel/test-repl-underscore.js b/test/parallel/test-repl-underscore.js
index 7e7cabeda7..d75a406925 100644
--- a/test/parallel/test-repl-underscore.js
+++ b/test/parallel/test-repl-underscore.js
@@ -149,7 +149,7 @@ function testResetContextGlobal() {
'10',
]);
- // delete globals leaked by REPL when `useGlobal` is `true`
+ // Delete globals leaked by REPL when `useGlobal` is `true`
delete global.module;
delete global.require;
}
diff --git a/test/parallel/test-repl-use-global.js b/test/parallel/test-repl-use-global.js
index 947adc7f25..00222608de 100644
--- a/test/parallel/test-repl-use-global.js
+++ b/test/parallel/test-repl-use-global.js
@@ -50,7 +50,7 @@ const processTest = (useGlobal, cb, output) => (err, repl) => {
let str = '';
output.on('data', (data) => (str += data));
- // if useGlobal is false, then `let process` should work
+ // If useGlobal is false, then `let process` should work
repl.write('let process;\n');
repl.write('21 * 2;\n');
repl.close();
diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js
index 98f47a03aa..91be2521ae 100644
--- a/test/parallel/test-repl.js
+++ b/test/parallel/test-repl.js
@@ -53,7 +53,7 @@ async function runReplTests(socket, prompt, tests) {
socket.write(`${send}\n`);
for (let expectedLine of expectedLines) {
- // special value: kSource refers to last sent source text
+ // Special value: kSource refers to last sent source text
if (expectedLine === kSource)
expectedLine = send;
@@ -233,7 +233,7 @@ const errorTests = [
send: 'new RegExp("foo", "wrong modifier");',
expect: [/^SyntaxError: /, '']
},
- // strict mode syntax errors should be caught (GH-5178)
+ // Strict mode syntax errors should be caught (GH-5178)
{
send: '(function() { "use strict"; return 0755; })()',
expect: [
@@ -403,7 +403,7 @@ const errorTests = [
''
]
},
- // do not fail when a String is created with line continuation
+ // Do not fail when a String is created with line continuation
{
send: '\'the\\\nfourth\\\neye\'',
expect: ['... ... \'thefourtheye\'']
@@ -416,7 +416,7 @@ const errorTests = [
send: ' \t .break \t ',
expect: ''
},
- // multiline strings preserve whitespace characters in them
+ // Multiline strings preserve whitespace characters in them
{
send: '\'the \\\n fourth\t\t\\\n eye \'',
expect: '... ... \'the fourth\\t\\t eye \''
diff --git a/test/parallel/test-setproctitle.js b/test/parallel/test-setproctitle.js
index e5f6858f78..2ed0730eec 100644
--- a/test/parallel/test-setproctitle.js
+++ b/test/parallel/test-setproctitle.js
@@ -35,7 +35,7 @@ exec(cmd, common.mustCall((error, stdout, stderr) => {
assert.ifError(error);
assert.strictEqual(stderr, '');
- // freebsd always add ' (procname)' to the process title
+ // Freebsd always add ' (procname)' to the process title
if (common.isFreeBSD || common.isOpenBSD)
title += ` (${path.basename(process.execPath)})`;
diff --git a/test/parallel/test-stdio-pipe-stderr.js b/test/parallel/test-stdio-pipe-stderr.js
index 06e93429d0..9dc5c758cf 100644
--- a/test/parallel/test-stdio-pipe-stderr.js
+++ b/test/parallel/test-stdio-pipe-stderr.js
@@ -13,10 +13,10 @@ const spawn = require('child_process').spawnSync;
tmpdir.refresh();
const fakeModulePath = join(tmpdir.path, 'batman.js');
const stderrOutputPath = join(tmpdir.path, 'stderr-output.txt');
-// we need to redirect stderr to a file to produce #11257
+// We need to redirect stderr to a file to produce #11257
const stream = fs.createWriteStream(stderrOutputPath);
-// the error described in #11257 only happens when we require a
+// The error described in #11257 only happens when we require a
// non-built-in module.
fs.writeFileSync(fakeModulePath, '', 'utf8');
diff --git a/test/parallel/test-stream-big-push.js b/test/parallel/test-stream-big-push.js
index 2369fac09a..5eabd4837e 100644
--- a/test/parallel/test-stream-big-push.js
+++ b/test/parallel/test-stream-big-push.js
@@ -62,7 +62,7 @@ chunk = r.read();
assert.strictEqual(chunk, null);
r.once('readable', () => {
- // this time, we'll get *all* the remaining data, because
+ // This time, we'll get *all* the remaining data, because
// it's been added synchronously, as the read WOULD take
// us below the hwm, and so it triggered a _read() again,
// which synchronously added more, which we then return.
diff --git a/test/parallel/test-stream-duplex-destroy.js b/test/parallel/test-stream-duplex-destroy.js
index 854d29ffc1..518998fd18 100644
--- a/test/parallel/test-stream-duplex-destroy.js
+++ b/test/parallel/test-stream-duplex-destroy.js
@@ -177,7 +177,7 @@ const { inherits } = require('util');
duplex.destroyed = true;
assert.strictEqual(duplex.destroyed, true);
- // the internal destroy() mechanism should not be triggered
+ // The internal destroy() mechanism should not be triggered
duplex.on('finish', common.mustNotCall());
duplex.on('end', common.mustNotCall());
duplex.destroy();
diff --git a/test/parallel/test-stream-pipe-after-end.js b/test/parallel/test-stream-pipe-after-end.js
index d0d0a19bd6..2eb714b2ca 100644
--- a/test/parallel/test-stream-pipe-after-end.js
+++ b/test/parallel/test-stream-pipe-after-end.js
@@ -51,10 +51,10 @@ class TestWritable extends Writable {
}
}
-// this one should not emit 'end' until we read() from it later.
+// This one should not emit 'end' until we read() from it later.
const ender = new TestReadable();
-// what happens when you pipe() a Readable that's already ended?
+// What happens when you pipe() a Readable that's already ended?
const piper = new TestReadable();
// pushes EOF null, and length=0, so this will trigger 'end'
piper.read();
diff --git a/test/parallel/test-stream-readable-async-iterators.js b/test/parallel/test-stream-readable-async-iterators.js
index 13da0d9c45..99b40d368f 100644
--- a/test/parallel/test-stream-readable-async-iterators.js
+++ b/test/parallel/test-stream-readable-async-iterators.js
@@ -460,5 +460,5 @@ async function tests() {
}
}
-// to avoid missing some tests if a promise does not resolve
+// To avoid missing some tests if a promise does not resolve
tests().then(common.mustCall());
diff --git a/test/parallel/test-stream-readable-destroy.js b/test/parallel/test-stream-readable-destroy.js
index a1407192e4..3354a8755e 100644
--- a/test/parallel/test-stream-readable-destroy.js
+++ b/test/parallel/test-stream-readable-destroy.js
@@ -148,7 +148,7 @@ const { inherits } = require('util');
read.destroyed = true;
assert.strictEqual(read.destroyed, true);
- // the internal destroy() mechanism should not be triggered
+ // The internal destroy() mechanism should not be triggered
read.on('end', common.mustNotCall());
read.destroy();
}
diff --git a/test/parallel/test-stream-readable-event.js b/test/parallel/test-stream-readable-event.js
index 06fac7dc8b..73ca80400a 100644
--- a/test/parallel/test-stream-readable-event.js
+++ b/test/parallel/test-stream-readable-event.js
@@ -45,7 +45,7 @@ const Readable = require('stream').Readable;
}
{
- // second test, make sure that readable is re-emitted if there's
+ // Second test, make sure that readable is re-emitted if there's
// already a length, while it IS reading.
const r = new Readable({
diff --git a/test/parallel/test-stream-readable-flow-recursion.js b/test/parallel/test-stream-readable-flow-recursion.js
index 43b8103eb6..6cc1ce65b1 100644
--- a/test/parallel/test-stream-readable-flow-recursion.js
+++ b/test/parallel/test-stream-readable-flow-recursion.js
@@ -23,7 +23,7 @@
require('../common');
const assert = require('assert');
-// this test verifies that passing a huge number to read(size)
+// This test verifies that passing a huge number to read(size)
// will push up the highWaterMark, and cause the stream to read
// more data continuously, but without triggering a nextTick
// warning or RangeError.
@@ -69,7 +69,7 @@ process.on('exit', function(code) {
assert.strictEqual(reads, 2);
// we pushed up the high water mark
assert.strictEqual(stream.readableHighWaterMark, 8192);
- // length is 0 right now, because we pulled it all out.
+ // Length is 0 right now, because we pulled it all out.
assert.strictEqual(stream.readableLength, 0);
assert(!code);
assert.strictEqual(depth, 0);
diff --git a/test/parallel/test-stream-readable-hwm-0.js b/test/parallel/test-stream-readable-hwm-0.js
index b66782b771..5bb17882db 100644
--- a/test/parallel/test-stream-readable-hwm-0.js
+++ b/test/parallel/test-stream-readable-hwm-0.js
@@ -10,7 +10,7 @@ const assert = require('assert');
const { Readable } = require('stream');
const r = new Readable({
- // must be called only once upon setting 'readable' listener
+ // Must be called only once upon setting 'readable' listener
read: common.mustCall(),
highWaterMark: 0,
});
diff --git a/test/parallel/test-stream-readable-reading-readingMore.js b/test/parallel/test-stream-readable-reading-readingMore.js
index 74468ed68a..5ea91dfa8b 100644
--- a/test/parallel/test-stream-readable-reading-readingMore.js
+++ b/test/parallel/test-stream-readable-reading-readingMore.js
@@ -15,7 +15,7 @@ const Readable = require('stream').Readable;
assert.strictEqual(state.readingMore, false);
readable.on('data', common.mustCall((data) => {
- // while in a flowing state with a 'readable' listener
+ // While in a flowing state with a 'readable' listener
// we should not be reading more
if (readable.readableFlowing)
assert.strictEqual(state.readingMore, true);
@@ -33,7 +33,7 @@ const Readable = require('stream').Readable;
const expectedReadingMore = [true, false];
readable.on('readable', common.mustCall(() => {
- // there is only one readingMore scheduled from on('data'),
+ // There is only one readingMore scheduled from on('data'),
// after which everything is governed by the .read() call
assert.strictEqual(state.readingMore, expectedReadingMore.shift());
@@ -73,7 +73,7 @@ const Readable = require('stream').Readable;
assert.strictEqual(state.readingMore, false);
readable.on('data', common.mustCall((data) => {
- // while in a flowing state without a 'readable' listener
+ // While in a flowing state without a 'readable' listener
// we should be reading more
if (readable.readableFlowing)
assert.strictEqual(state.readingMore, true);
@@ -146,7 +146,7 @@ const Readable = require('stream').Readable;
// We are still not flowing, we will be resuming in the next tick
assert.strictEqual(state.flowing, false);
- // wait for nextTick, so the readableListener flag resets
+ // Wait for nextTick, so the readableListener flag resets
process.nextTick(function() {
readable.resume();
diff --git a/test/parallel/test-stream-readable-resumeScheduled.js b/test/parallel/test-stream-readable-resumeScheduled.js
index 6d1bc91338..aa521629b6 100644
--- a/test/parallel/test-stream-readable-resumeScheduled.js
+++ b/test/parallel/test-stream-readable-resumeScheduled.js
@@ -14,7 +14,7 @@ const { Readable, Writable } = require('stream');
// resumeScheduled should start = `false`.
assert.strictEqual(r._readableState.resumeScheduled, false);
- // calling pipe() should change the state value = true.
+ // Calling pipe() should change the state value = true.
r.pipe(w);
assert.strictEqual(r._readableState.resumeScheduled, true);
@@ -32,7 +32,7 @@ const { Readable, Writable } = require('stream');
r.push(Buffer.from([1, 2, 3]));
- // adding 'data' listener should change the state value
+ // Adding 'data' listener should change the state value
r.on('data', common.mustCall(() => {
assert.strictEqual(r._readableState.resumeScheduled, false);
}));
diff --git a/test/parallel/test-stream-unshift-empty-chunk.js b/test/parallel/test-stream-unshift-empty-chunk.js
index 0f0a13722c..dbcafbfdcb 100644
--- a/test/parallel/test-stream-unshift-empty-chunk.js
+++ b/test/parallel/test-stream-unshift-empty-chunk.js
@@ -43,7 +43,7 @@ r.on('readable', () => {
let chunk;
while (chunk = r.read()) {
seen.push(chunk.toString());
- // simulate only reading a certain amount of the data,
+ // Simulate only reading a certain amount of the data,
// and then putting the rest of the chunk back into the
// stream, like a parser might do. We just fill it with
// 'y' so that it's easy to see which bits were touched,
diff --git a/test/parallel/test-stream-writable-destroy.js b/test/parallel/test-stream-writable-destroy.js
index a88bf9ab24..83c941f459 100644
--- a/test/parallel/test-stream-writable-destroy.js
+++ b/test/parallel/test-stream-writable-destroy.js
@@ -161,7 +161,7 @@ const { inherits } = require('util');
write.destroyed = true;
assert.strictEqual(write.destroyed, true);
- // the internal destroy() mechanism should not be triggered
+ // The internal destroy() mechanism should not be triggered
write.on('close', common.mustNotCall());
write.destroy();
}
diff --git a/test/parallel/test-stream-writable-write-writev-finish.js b/test/parallel/test-stream-writable-write-writev-finish.js
index 98660b76ac..4399f1ca50 100644
--- a/test/parallel/test-stream-writable-write-writev-finish.js
+++ b/test/parallel/test-stream-writable-write-writev-finish.js
@@ -4,7 +4,7 @@ const common = require('../common');
const assert = require('assert');
const stream = require('stream');
-// ensure consistency between the finish event when using cork()
+// Ensure consistency between the finish event when using cork()
// and writev and when not using them
{
diff --git a/test/parallel/test-stream2-basic.js b/test/parallel/test-stream2-basic.js
index f1e4fb02b4..682a033899 100644
--- a/test/parallel/test-stream2-basic.js
+++ b/test/parallel/test-stream2-basic.js
@@ -151,7 +151,7 @@ class TestWriter extends EE {
// Verify unpipe
const r = new TestReader(5);
- // unpipe after 3 writes, then write to another stream instead.
+ // Unpipe after 3 writes, then write to another stream instead.
let expect = [ 'xxxxx',
'xxxxx',
'xxxxx',
@@ -227,7 +227,7 @@ class TestWriter extends EE {
// Verify multi-unpipe
const r = new TestReader(5);
- // unpipe after 3 writes, then write to another stream instead.
+ // Unpipe after 3 writes, then write to another stream instead.
let expect = [ 'xxxxx',
'xxxxx',
'xxxxx',
diff --git a/test/parallel/test-stream2-transform.js b/test/parallel/test-stream2-transform.js
index 8484e8ddb7..a1bad84a8f 100644
--- a/test/parallel/test-stream2-transform.js
+++ b/test/parallel/test-stream2-transform.js
@@ -210,7 +210,7 @@ const Transform = require('_stream_transform');
// Verify asymmetric transform (compress)
const pt = new Transform();
- // each output is the first char of 3 consecutive chunks,
+ // Each output is the first char of 3 consecutive chunks,
// or whatever's left.
pt.state = '';
@@ -259,7 +259,7 @@ const Transform = require('_stream_transform');
}));
}
-// this tests for a stall when data is written to a full stream
+// This tests for a stall when data is written to a full stream
// that has empty transforms.
{
// Verify complex transform behavior
diff --git a/test/parallel/test-stream3-cork-end.js b/test/parallel/test-stream3-cork-end.js
index fb109e6bb8..e046d46368 100644
--- a/test/parallel/test-stream3-cork-end.js
+++ b/test/parallel/test-stream3-cork-end.js
@@ -19,7 +19,7 @@ let seenEnd = false;
const w = new Writable();
// lets arrange to store the chunks
w._write = function(chunk, encoding, cb) {
- // stream end event is not seen before the last write
+ // Stream end event is not seen before the last write
assert.ok(!seenEnd);
// default encoding given none was specified
assert.strictEqual(encoding, 'buffer');
diff --git a/test/parallel/test-stream3-pause-then-read.js b/test/parallel/test-stream3-pause-then-read.js
index 5de8d8ec51..d514c89e01 100644
--- a/test/parallel/test-stream3-pause-then-read.js
+++ b/test/parallel/test-stream3-pause-then-read.js
@@ -137,7 +137,7 @@ function read1234() {
function resumePause() {
console.error('resumePause');
- // don't read anything, just resume and re-pause a whole bunch
+ // Don't read anything, just resume and re-pause a whole bunch
r.resume();
r.pause();
r.resume();
diff --git a/test/parallel/test-stringbytes-external.js b/test/parallel/test-stringbytes-external.js
index 2a04159ce9..f05b40a3ef 100644
--- a/test/parallel/test-stringbytes-external.js
+++ b/test/parallel/test-stringbytes-external.js
@@ -22,10 +22,10 @@
'use strict';
require('../common');
const assert = require('assert');
-// minimum string size to overflow into external string space
+// Minimum string size to overflow into external string space
const EXTERN_APEX = 0xFBEE9;
-// manually controlled string for checking binary output
+// Manually controlled string for checking binary output
let ucs2_control = 'a\u0000';
let write_str = 'a';
@@ -56,7 +56,7 @@ for (let i = 0; i < b.length; i += 2) {
assert.strictEqual(b[i + 1], 0);
}
-// create another string to create an external string
+// Create another string to create an external string
const b_ucs = b.toString('ucs2');
// check control against external binary string
diff --git a/test/parallel/test-timers-immediate-unref.js b/test/parallel/test-timers-immediate-unref.js
index ecb26682c1..5a7629781d 100644
--- a/test/parallel/test-timers-immediate-unref.js
+++ b/test/parallel/test-timers-immediate-unref.js
@@ -29,7 +29,7 @@ function secondStep() {
const immA = setImmediate(() => {
clearImmediate(immA);
clearImmediate(immB);
- // this should not keep the event loop open indefinitely
+ // This should not keep the event loop open indefinitely
// or do anything else weird
immA.ref();
immB.ref();
diff --git a/test/parallel/test-timers-reset-process-domain-on-throw.js b/test/parallel/test-timers-reset-process-domain-on-throw.js
index 946ae715b0..55fd43feb8 100644
--- a/test/parallel/test-timers-reset-process-domain-on-throw.js
+++ b/test/parallel/test-timers-reset-process-domain-on-throw.js
@@ -21,7 +21,7 @@ function err() {
d.run(err2);
function err2() {
- // this function doesn't exist, and throws an error as a result.
+ // This function doesn't exist, and throws an error as a result.
err3(); // eslint-disable-line no-undef
}
diff --git a/test/parallel/test-timers.js b/test/parallel/test-timers.js
index 1aa5d351a4..e29d756cfe 100644
--- a/test/parallel/test-timers.js
+++ b/test/parallel/test-timers.js
@@ -47,7 +47,7 @@ const inputs = [
0.5,
1,
1.0,
- 2147483648, // browser behavior: timeouts > 2^31-1 run on next tick
+ 2147483648, // Browser behavior: timeouts > 2^31-1 run on next tick
12345678901234 // ditto
];
diff --git a/test/parallel/test-tls-client-mindhsize.js b/test/parallel/test-tls-client-mindhsize.js
index 3017d30e6c..a6fbc67bd8 100644
--- a/test/parallel/test-tls-client-mindhsize.js
+++ b/test/parallel/test-tls-client-mindhsize.js
@@ -35,7 +35,7 @@ function test(size, err, next) {
});
server.listen(0, '127.0.0.1', function() {
- // client set minimum DH parameter size to 2048 bits so that
+ // Client set minimum DH parameter size to 2048 bits so that
// it fails when it make a connection to the tls server where
// dhparams is 1024 bits
const client = tls.connect({
diff --git a/test/parallel/test-tls-socket-close.js b/test/parallel/test-tls-socket-close.js
index debaca213b..3b2e18184b 100644
--- a/test/parallel/test-tls-socket-close.js
+++ b/test/parallel/test-tls-socket-close.js
@@ -44,7 +44,7 @@ function connectClient(server) {
assert(netSocket);
netSocket.setTimeout(1, common.mustCall(() => {
assert(tlsSocket);
- // this breaks if TLSSocket is already managing the socket:
+ // This breaks if TLSSocket is already managing the socket:
netSocket.destroy();
const interval = setInterval(() => {
// Checking this way allows us to do the write at a time that causes a
diff --git a/test/parallel/test-url-format.js b/test/parallel/test-url-format.js
index 571895832a..d18ff6715b 100644
--- a/test/parallel/test-url-format.js
+++ b/test/parallel/test-url-format.js
@@ -216,7 +216,7 @@ const formatTests = {
pathname: '/'
},
- // more than 255 characters in hostname which exceeds the limit
+ // More than 255 characters in hostname which exceeds the limit
[`http://${'a'.repeat(255)}.com/node`]: {
href: 'http:///node',
protocol: 'http:',
@@ -227,7 +227,7 @@ const formatTests = {
path: '/node'
},
- // greater than or equal to 63 characters after `.` in hostname
+ // Greater than or equal to 63 characters after `.` in hostname
[`http://www.${'z'.repeat(63)}example.com/node`]: {
href: `http://www.${'z'.repeat(63)}example.com/node`,
protocol: 'http:',
diff --git a/test/parallel/test-url-parse-format.js b/test/parallel/test-url-parse-format.js
index b18a5fe585..cbe8eea257 100644
--- a/test/parallel/test-url-parse-format.js
+++ b/test/parallel/test-url-parse-format.js
@@ -194,7 +194,7 @@ const parseTests = {
path: ';a/b/c?d=e'
},
- // make sure that we don't accidentally lcast the path parts.
+ // Make sure that we don't accidentally lcast the path parts.
'HtTp://x.y.cOm;A/b/c?d=e#f g<h>i': {
href: 'http://x.y.com/;A/b/c?d=e#f%20g%3Ch%3Ei',
protocol: 'http:',
diff --git a/test/parallel/test-v8-coverage.js b/test/parallel/test-v8-coverage.js
index 69a8286eed..75a6aa03fd 100644
--- a/test/parallel/test-v8-coverage.js
+++ b/test/parallel/test-v8-coverage.js
@@ -31,7 +31,7 @@ function nextdir() {
assert.strictEqual(fixtureCoverage.functions[1].ranges[1].count, 0);
}
-// outputs coverage when process.exit(1) exits process.
+// Outputs coverage when process.exit(1) exits process.
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
@@ -96,7 +96,7 @@ function nextdir() {
assert.strictEqual(fixtureCoverage.functions[2].ranges[1].count, 0);
}
-// does not output coverage if NODE_V8_COVERAGE is empty.
+// Does not output coverage if NODE_V8_COVERAGE is empty.
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
@@ -122,7 +122,7 @@ function nextdir() {
assert.strictEqual(fixtureCoverage.functions[1].ranges[0].count, 1);
}
-// extracts the coverage object for a given fixture name.
+// Extracts the coverage object for a given fixture name.
function getFixtureCoverage(fixtureFile, coverageDirectory) {
const coverageFiles = fs.readdirSync(coverageDirectory);
for (const coverageFile of coverageFiles) {
diff --git a/test/parallel/test-whatwg-url-custom-properties.js b/test/parallel/test-whatwg-url-custom-properties.js
index 4a35215bc4..035cc1eae2 100644
--- a/test/parallel/test-whatwg-url-custom-properties.js
+++ b/test/parallel/test-whatwg-url-custom-properties.js
@@ -28,7 +28,7 @@ const expected = ['toString',
assert.deepStrictEqual(props, expected);
-// href is writable (not readonly) and is stringifier
+// `href` is writable (not readonly) and is stringifier
assert.strictEqual(url.toString(), url.href);
url.href = 'http://user:pass@foo.bar.com:21/aaa/zzz?l=25#test';
assert.strictEqual(url.href,
diff --git a/test/parallel/test-worker-uncaught-exception-async.js b/test/parallel/test-worker-uncaught-exception-async.js
index 862b1a66d6..9ad4aace23 100644
--- a/test/parallel/test-worker-uncaught-exception-async.js
+++ b/test/parallel/test-worker-uncaught-exception-async.js
@@ -18,7 +18,7 @@ if (!process.env.HAS_STARTED_WORKER) {
assert.strictEqual(code, 1);
}));
} else {
- // cannot use common.mustCall as it cannot catch this
+ // Cannot use common.mustCall as it cannot catch this
let called = false;
process.on('exit', (code) => {
if (!called) {
diff --git a/test/parallel/test-worker-uncaught-exception.js b/test/parallel/test-worker-uncaught-exception.js
index 95c142b6c7..40996eccb3 100644
--- a/test/parallel/test-worker-uncaught-exception.js
+++ b/test/parallel/test-worker-uncaught-exception.js
@@ -18,7 +18,7 @@ if (!process.env.HAS_STARTED_WORKER) {
assert.strictEqual(code, 1);
}));
} else {
- // cannot use common.mustCall as it cannot catch this
+ // Cannot use common.mustCall as it cannot catch this
let called = false;
process.on('exit', (code) => {
if (!called) {
diff --git a/test/parallel/test-zlib-convenience-methods.js b/test/parallel/test-zlib-convenience-methods.js
index 5b7699f429..788cf2b013 100644
--- a/test/parallel/test-zlib-convenience-methods.js
+++ b/test/parallel/test-zlib-convenience-methods.js
@@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
-// test convenience methods with and without options supplied
+// Test convenience methods with and without options supplied
const common = require('../common');
const assert = require('assert');
diff --git a/test/parallel/test-zlib-destroy-pipe.js b/test/parallel/test-zlib-destroy-pipe.js
index 38b8a5b492..67821a21b6 100644
--- a/test/parallel/test-zlib-destroy-pipe.js
+++ b/test/parallel/test-zlib-destroy-pipe.js
@@ -4,7 +4,7 @@ const common = require('../common');
const zlib = require('zlib');
const { Writable } = require('stream');
-// verify that the zlib transform does not error in case
+// Verify that the zlib transform does not error in case
// it is destroyed with data still in flight
const ts = zlib.createGzip();
diff --git a/test/parallel/test-zlib-flush-drain.js b/test/parallel/test-zlib-flush-drain.js
index a470e32090..ac89e990c3 100644
--- a/test/parallel/test-zlib-flush-drain.js
+++ b/test/parallel/test-zlib-flush-drain.js
@@ -12,7 +12,7 @@ const opts = {
const deflater = zlib.createDeflate(opts);
-// shim deflater.flush so we can count times executed
+// Shim deflater.flush so we can count times executed
let flushCount = 0;
let drainCount = 0;
diff --git a/test/parallel/test-zlib-from-concatenated-gzip.js b/test/parallel/test-zlib-from-concatenated-gzip.js
index fea8ab6de2..45f8281387 100644
--- a/test/parallel/test-zlib-from-concatenated-gzip.js
+++ b/test/parallel/test-zlib-from-concatenated-gzip.js
@@ -76,7 +76,7 @@ fs.createReadStream(pmmFileGz)
);
}));
- // first write: write "abc" + the first bytes of "def"
+ // First write: write "abc" + the first bytes of "def"
unzip.write(Buffer.concat([
abcEncoded, defEncoded.slice(0, offset)
]));
diff --git a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js
index c9eeb29f93..f7b09f7ec0 100644
--- a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js
+++ b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js
@@ -1,5 +1,5 @@
'use strict';
-// test unzipping a gzip file that has trailing garbage
+// Test unzipping a gzip file that has trailing garbage
const common = require('../common');
const assert = require('assert');
diff --git a/test/parallel/test-zlib-from-string.js b/test/parallel/test-zlib-from-string.js
index 617a8b5505..fa96623536 100644
--- a/test/parallel/test-zlib-from-string.js
+++ b/test/parallel/test-zlib-from-string.js
@@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
-// test compressing and uncompressing a string with zlib
+// Test compressing and uncompressing a string with zlib
const common = require('../common');
const assert = require('assert');
diff --git a/test/parallel/test-zlib-truncated.js b/test/parallel/test-zlib-truncated.js
index e04ef7e3d8..d8a04d3c0c 100644
--- a/test/parallel/test-zlib-truncated.js
+++ b/test/parallel/test-zlib-truncated.js
@@ -1,5 +1,5 @@
'use strict';
-// tests zlib streams with truncated compressed input
+// Tests zlib streams with truncated compressed input
require('../common');
const assert = require('assert');
@@ -50,11 +50,11 @@ const errMessage = /unexpected end of file/;
const syncFlushOpt = { finishFlush: zlib.constants.Z_SYNC_FLUSH };
- // sync truncated input test, finishFlush = Z_SYNC_FLUSH
+ // Sync truncated input test, finishFlush = Z_SYNC_FLUSH
const result = toUTF8(zlib[methods.decompSync](truncated, syncFlushOpt));
assert.strictEqual(result, inputString.substr(0, result.length));
- // async truncated input test, finishFlush = Z_SYNC_FLUSH
+ // Async truncated input test, finishFlush = Z_SYNC_FLUSH
zlib[methods.decomp](truncated, syncFlushOpt, function(err, decompressed) {
assert.ifError(err);
const result = toUTF8(decompressed);
diff --git a/test/parallel/test-zlib-write-after-flush.js b/test/parallel/test-zlib-write-after-flush.js
index 6d8d787343..e8d683039f 100644
--- a/test/parallel/test-zlib-write-after-flush.js
+++ b/test/parallel/test-zlib-write-after-flush.js
@@ -38,7 +38,7 @@ gunz.on('end', common.mustCall(() => {
assert.strictEqual(gzip._nextFlush, -1);
}));
-// make sure that flush/write doesn't trigger an assert failure
+// Make sure that flush/write doesn't trigger an assert failure
gzip.flush();
gzip.write(input);
gzip.end();
diff --git a/test/parallel/test-zlib.js b/test/parallel/test-zlib.js
index 1b6855a0b9..66214602cd 100644
--- a/test/parallel/test-zlib.js
+++ b/test/parallel/test-zlib.js
@@ -49,7 +49,7 @@ let windowBits = [8, 9, 10, 11, 12, 13, 14, 15];
let memLevel = [1, 2, 3, 4, 5, 6, 7, 8, 9];
let strategy = [0, 1, 2, 3, 4];
-// it's nice in theory to test every combination, but it
+// It's nice in theory to test every combination, but it
// takes WAY too long. Maybe a pummel test could do this?
if (!process.env.PUMMEL) {
trickle = [1024];
@@ -173,7 +173,7 @@ zlib.createDeflateRaw({ windowBits: 8 });
() => assert(Buffer.concat(raw).equals(Buffer.concat(reinflated)))));
}
-// for each of the files, make sure that compressing and
+// For each of the files, make sure that compressing and
// decompressing results in the same data, for every combination
// of the options set above.
@@ -196,7 +196,7 @@ testKeys.forEach(common.mustCall((file) => {
const ss = new SlowStream(trickle);
const buf = new BufferStream();
- // verify that the same exact buffer comes out the other end.
+ // Verify that the same exact buffer comes out the other end.
buf.on('data', common.mustCall((c) => {
const msg = `${file} ${chunkSize} ${
JSON.stringify(opts)} ${Def.name} -> ${Inf.name}`;
diff --git a/test/pseudo-tty/test-async-wrap-getasyncid-tty.js b/test/pseudo-tty/test-async-wrap-getasyncid-tty.js
index 80ffe9e7cc..5995a91181 100644
--- a/test/pseudo-tty/test-async-wrap-getasyncid-tty.js
+++ b/test/pseudo-tty/test-async-wrap-getasyncid-tty.js
@@ -1,7 +1,7 @@
// Flags: --expose-internals --no-warnings
'use strict';
-// see also test/sequential/test-async-wrap-getasyncid.js
+// See also test/sequential/test-async-wrap-getasyncid.js
const common = require('../common');
const assert = require('assert');
diff --git a/test/pseudo-tty/test-handle-wrap-isrefed-tty.js b/test/pseudo-tty/test-handle-wrap-isrefed-tty.js
index ca2f1132d0..aa6ae341b4 100644
--- a/test/pseudo-tty/test-handle-wrap-isrefed-tty.js
+++ b/test/pseudo-tty/test-handle-wrap-isrefed-tty.js
@@ -1,7 +1,7 @@
// Flags: --expose-internals --no-warnings
'use strict';
-// see also test/parallel/test-handle-wrap-isrefed.js
+// See also test/parallel/test-handle-wrap-isrefed.js
const common = require('../common');
const strictEqual = require('assert').strictEqual;
diff --git a/test/pummel/test-exec.js b/test/pummel/test-exec.js
index 7d631f87f2..64c94aae5a 100644
--- a/test/pummel/test-exec.js
+++ b/test/pummel/test-exec.js
@@ -95,7 +95,7 @@ const killMeTwice = exec(SLEEP3_COMMAND, { timeout: 1000 },
process.nextTick(function() {
console.log(`kill pid ${killMeTwice.pid}`);
- // make sure there is no race condition in starting the process
+ // Make sure there is no race condition in starting the process
// the PID SHOULD exist directly following the exec() call.
assert.strictEqual(typeof killMeTwice._handle.pid, 'number');
// Kill the process
diff --git a/test/pummel/test-process-hrtime.js b/test/pummel/test-process-hrtime.js
index f0f8768702..2a7e34a111 100644
--- a/test/pummel/test-process-hrtime.js
+++ b/test/pummel/test-process-hrtime.js
@@ -35,7 +35,7 @@ while (Date.now() - now < 2000);
// get a diff reading
const diff = process.hrtime(start);
-// should be at least 1 second, at most 2 seconds later
+// Should be at least 1 second, at most 2 seconds later
// (the while loop will usually exit a few nanoseconds before 2)
assert(diff[0] >= 1);
assert(diff[0] <= 2);
diff --git a/test/sequential/test-cli-syntax-file-not-found.js b/test/sequential/test-cli-syntax-file-not-found.js
index b90033a396..2bfb0e38c7 100644
--- a/test/sequential/test-cli-syntax-file-not-found.js
+++ b/test/sequential/test-cli-syntax-file-not-found.js
@@ -30,7 +30,7 @@ const notFoundRE = /^Error: Cannot find module/m;
// no stdout should be produced
assert.strictEqual(stdout, '');
- // stderr should have a module not found error message
+ // `stderr` should have a module not found error message.
assert(notFoundRE.test(stderr), `${notFoundRE} === ${stderr}`);
assert.strictEqual(err.code, 1,
diff --git a/test/sequential/test-fs-watch.js b/test/sequential/test-fs-watch.js
index 9755cc8bb1..a67de8c6d1 100644
--- a/test/sequential/test-fs-watch.js
+++ b/test/sequential/test-fs-watch.js
@@ -111,7 +111,7 @@ tmpdir.refresh();
fs.watch(__filename, { persistent: false }, common.mustNotCall());
}
-// whitebox test to ensure that wrapped FSEvent is safe
+// Whitebox test to ensure that wrapped FSEvent is safe
// https://github.com/joyent/node/issues/6690
{
let oldhandle;
diff --git a/test/sequential/test-http-max-http-headers.js b/test/sequential/test-http-max-http-headers.js
index 64358e8140..f1be923e22 100644
--- a/test/sequential/test-http-max-http-headers.js
+++ b/test/sequential/test-http-max-http-headers.js
@@ -49,7 +49,7 @@ const timeout = common.platformTimeout(10);
function writeHeaders(socket, headers) {
const array = [];
- // this is off from 1024 so that \r\n does not get split
+ // This is off from 1024 so that \r\n does not get split
const chunkSize = 1000;
let last = 0;
diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js
index 0e8aafe51b..6cfa4da04e 100644
--- a/test/sequential/test-module-loading.js
+++ b/test/sequential/test-module-loading.js
@@ -35,11 +35,11 @@ assert.strictEqual(require.main.id, '.');
assert.strictEqual(require.main, module);
assert.strictEqual(process.mainModule, module);
-// assert that it's *not* the main module in the required module.
+// Assert that it's *not* the main module in the required module.
require('../fixtures/not-main-module.js');
{
- // require a file with a request that includes the extension
+ // Require a file with a request that includes the extension
const a_js = require('../fixtures/a.js');
assert.strictEqual(a_js.number, 42);
}
@@ -126,7 +126,7 @@ require('../fixtures/node_modules/foo');
{
console.error('test name clashes');
- // this one exists and should import the local module
+ // This one exists and should import the local module
const my_path = require('../fixtures/path');
assert.ok(my_path.path_func instanceof Function);
// this one does not exist and should throw
@@ -235,7 +235,7 @@ try {
{
- // now verify that module.children contains all the different
+ // Now verify that module.children contains all the different
// modules that we've required, and that all of them contain
// the appropriate children, and so on.
diff --git a/test/sequential/test-next-tick-error-spin.js b/test/sequential/test-next-tick-error-spin.js
index 70d924cfa3..071a017877 100644
--- a/test/sequential/test-next-tick-error-spin.js
+++ b/test/sequential/test-next-tick-error-spin.js
@@ -40,7 +40,7 @@ if (process.argv[2] !== 'child') {
const domain = require('domain');
const d = domain.create();
- // in the error handler, we trigger several MakeCallback events
+ // In the error handler, we trigger several MakeCallback events
d.on('error', function() {
console.log('a');
console.log('b');
diff --git a/test/sequential/test-timers-set-interval-excludes-callback-duration.js b/test/sequential/test-timers-set-interval-excludes-callback-duration.js
index be9f491b92..90eb16b0e2 100644
--- a/test/sequential/test-timers-set-interval-excludes-callback-duration.js
+++ b/test/sequential/test-timers-set-interval-excludes-callback-duration.js
@@ -8,7 +8,7 @@ const t = setInterval(() => {
cntr++;
if (cntr === 1) {
common.busyLoop(100);
- // ensure that the event loop passes before the second interval
+ // Ensure that the event loop passes before the second interval
setImmediate(() => assert.strictEqual(cntr, 1));
first = Date.now();
} else if (cntr === 2) {