summaryrefslogtreecommitdiff
path: root/test/parallel
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-01-21 01:22:27 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-02-28 18:31:10 +0100
commit9edce1e12a7b69e7986dd15fce18d6e46590161a (patch)
treec5d37d8016a27bab698520ecc51cda4f7ad99d40 /test/parallel
parent7b674697d8005c29391ebaaf562eb4d92ed9b129 (diff)
downloadandroid-node-v8-9edce1e12a7b69e7986dd15fce18d6e46590161a.tar.gz
android-node-v8-9edce1e12a7b69e7986dd15fce18d6e46590161a.tar.bz2
android-node-v8-9edce1e12a7b69e7986dd15fce18d6e46590161a.zip
benchmark,doc,lib,test: capitalize comments
This updates a lot of comments. PR-URL: https://github.com/nodejs/node/pull/26223 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Diffstat (limited to 'test/parallel')
-rw-r--r--test/parallel/test-buffer-alloc.js12
-rw-r--r--test/parallel/test-buffer-bytelength.js2
-rw-r--r--test/parallel/test-buffer-copy.js6
-rw-r--r--test/parallel/test-buffer-includes.js2
-rw-r--r--test/parallel/test-buffer-indexof.js4
-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.js8
-rw-r--r--test/parallel/test-child-process-disconnect.js2
-rw-r--r--test/parallel/test-child-process-fork-net.js2
-rw-r--r--test/parallel/test-child-process-silent.js2
-rw-r--r--test/parallel/test-child-process-stdout-flush-exit.js2
-rw-r--r--test/parallel/test-child-process-validate-stdio.js4
-rw-r--r--test/parallel/test-cli-syntax-eval.js2
-rw-r--r--test/parallel/test-cli-syntax-piped-bad.js2
-rw-r--r--test/parallel/test-cli-syntax-piped-good.js2
-rw-r--r--test/parallel/test-cluster-disconnect-idle-worker.js2
-rw-r--r--test/parallel/test-cluster-disconnect.js2
-rw-r--r--test/parallel/test-cluster-eaccess.js8
-rw-r--r--test/parallel/test-cluster-master-kill.js2
-rw-r--r--test/parallel/test-cluster-worker-kill.js2
-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.js2
-rw-r--r--test/parallel/test-constants.js2
-rw-r--r--test/parallel/test-crypto-authenticated.js4
-rw-r--r--test/parallel/test-crypto-binary-default.js4
-rw-r--r--test/parallel/test-crypto-cipher-decipher.js4
-rw-r--r--test/parallel/test-crypto-dh.js2
-rw-r--r--test/parallel/test-crypto-from-binary.js2
-rw-r--r--test/parallel/test-crypto-hash.js2
-rw-r--r--test/parallel/test-crypto-random.js2
-rw-r--r--test/parallel/test-domain-http-server.js4
-rw-r--r--test/parallel/test-fs-append-file-sync.js6
-rw-r--r--test/parallel/test-fs-long-path.js2
-rw-r--r--test/parallel/test-fs-mkdir.js4
-rw-r--r--test/parallel/test-fs-promises.js6
-rw-r--r--test/parallel/test-fs-readfile-pipe-large.js2
-rw-r--r--test/parallel/test-fs-readfile-pipe.js2
-rw-r--r--test/parallel/test-fs-readfile-zero-byte-liar.js2
-rw-r--r--test/parallel/test-fs-readfilesync-pipe-large.js2
-rw-r--r--test/parallel/test-fs-watchfile-bigint.js4
-rw-r--r--test/parallel/test-fs-watchfile.js4
-rw-r--r--test/parallel/test-fs-write-file.js2
-rw-r--r--test/parallel/test-http-addrequest-localaddress.js9
-rw-r--r--test/parallel/test-http-agent-destroyed-socket.js2
-rw-r--r--test/parallel/test-http-agent-keepalive.js2
-rw-r--r--test/parallel/test-http-client-pipe-end.js2
-rw-r--r--test/parallel/test-http-incoming-matchKnownFields.js2
-rw-r--r--test/parallel/test-http-incoming-pipelined-socket-destroy.js4
-rw-r--r--test/parallel/test-http-outgoing-finish.js2
-rw-r--r--test/parallel/test-http-outgoing-settimeout.js2
-rw-r--r--test/parallel/test-http-readable-data-event.js2
-rw-r--r--test/parallel/test-http-res-write-end-dont-take-array.js2
-rw-r--r--test/parallel/test-http-set-timeout-server.js6
-rw-r--r--test/parallel/test-http-set-trailers.js2
-rw-r--r--test/parallel/test-http-upgrade-server2.js2
-rw-r--r--test/parallel/test-http-url.parse-auth-with-header-in-request.js2
-rw-r--r--test/parallel/test-http-url.parse-auth.js2
-rw-r--r--test/parallel/test-http-url.parse-basic.js4
-rw-r--r--test/parallel/test-http-url.parse-https.request.js2
-rw-r--r--test/parallel/test-http-write-head.js2
-rw-r--r--test/parallel/test-http2-client-destroy.js2
-rw-r--r--test/parallel/test-http2-client-onconnect-errors.js2
-rw-r--r--test/parallel/test-http2-client-set-priority.js2
-rw-r--r--test/parallel/test-http2-compat-serverrequest-end.js2
-rw-r--r--test/parallel/test-http2-compat-serverresponse-createpushresponse.js2
-rw-r--r--test/parallel/test-http2-compat-serverresponse-end.js2
-rw-r--r--test/parallel/test-http2-connect.js2
-rw-r--r--test/parallel/test-http2-dont-lose-data.js2
-rw-r--r--test/parallel/test-http2-info-headers-errors.js2
-rw-r--r--test/parallel/test-http2-misbehaving-multiplex.js2
-rw-r--r--test/parallel/test-http2-respond-with-fd-errors.js2
-rw-r--r--test/parallel/test-http2-server-errors.js2
-rw-r--r--test/parallel/test-http2-window-size.js2
-rw-r--r--test/parallel/test-https-set-timeout-server.js6
-rw-r--r--test/parallel/test-https-strict.js2
-rw-r--r--test/parallel/test-listen-fd-cluster.js2
-rw-r--r--test/parallel/test-net-keepalive.js2
-rw-r--r--test/parallel/test-net-persistent-keepalive.js2
-rw-r--r--test/parallel/test-net-socket-local-address.js2
-rw-r--r--test/parallel/test-path-resolve.js2
-rw-r--r--test/parallel/test-preload.js8
-rw-r--r--test/parallel/test-priority-queue.js4
-rw-r--r--test/parallel/test-process-env-allowed-flags.js2
-rw-r--r--test/parallel/test-process-external-stdio-close-spawn.js2
-rw-r--r--test/parallel/test-process-external-stdio-close.js2
-rw-r--r--test/parallel/test-process-really-exit.js2
-rw-r--r--test/parallel/test-process-umask.js2
-rw-r--r--test/parallel/test-punycode.js6
-rw-r--r--test/parallel/test-querystring.js8
-rw-r--r--test/parallel/test-readline-interface.js8
-rw-r--r--test/parallel/test-readline-keys.js6
-rw-r--r--test/parallel/test-readline-set-raw-mode.js4
-rw-r--r--test/parallel/test-repl-context.js4
-rw-r--r--test/parallel/test-repl-end-emits-exit.js4
-rw-r--r--test/parallel/test-repl-save-load.js4
-rw-r--r--test/parallel/test-repl-tab-complete.js10
-rw-r--r--test/parallel/test-repl-tab.js2
-rw-r--r--test/parallel/test-repl.js4
-rw-r--r--test/parallel/test-require-long-path.js2
-rw-r--r--test/parallel/test-stream-duplex-destroy.js2
-rw-r--r--test/parallel/test-stream-ispaused.js2
-rw-r--r--test/parallel/test-stream-pipe-unpipe-streams.js2
-rw-r--r--test/parallel/test-stream-pipeline.js2
-rw-r--r--test/parallel/test-stream-readable-destroy.js2
-rw-r--r--test/parallel/test-stream-readable-event.js6
-rw-r--r--test/parallel/test-stream-readable-flow-recursion.js2
-rw-r--r--test/parallel/test-stream-readable-reading-readingMore.js2
-rw-r--r--test/parallel/test-stream-transform-destroy.js2
-rw-r--r--test/parallel/test-stream-transform-split-highwatermark.js2
-rw-r--r--test/parallel/test-stream-writable-destroy.js2
-rw-r--r--test/parallel/test-stream-writev.js2
-rw-r--r--test/parallel/test-stream2-transform.js4
-rw-r--r--test/parallel/test-stream2-unpipe-drain.js2
-rw-r--r--test/parallel/test-stream3-cork-end.js4
-rw-r--r--test/parallel/test-stream3-cork-uncork.js4
-rw-r--r--test/parallel/test-string-decoder-end.js2
-rw-r--r--test/parallel/test-stringbytes-external.js12
-rw-r--r--test/parallel/test-tls-getcipher.js2
-rw-r--r--test/parallel/test-trace-events-api.js4
-rw-r--r--test/parallel/test-trace-events-category-used.js4
-rw-r--r--test/parallel/test-url-parse-format.js2
-rw-r--r--test/parallel/test-v8-coverage.js2
-rw-r--r--test/parallel/test-vm-global-property-interceptors.js2
-rw-r--r--test/parallel/test-windows-failed-heap-allocation.js2
-rw-r--r--test/parallel/test-zlib-deflate-raw-inherits.js2
-rw-r--r--test/parallel/test-zlib-destroy.js2
-rw-r--r--test/parallel/test-zlib-dictionary.js2
-rw-r--r--test/parallel/test-zlib.js2
130 files changed, 201 insertions, 202 deletions
diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js
index 2b8e9c5f22..c03179a769 100644
--- a/test/parallel/test-buffer-alloc.js
+++ b/test/parallel/test-buffer-alloc.js
@@ -90,7 +90,7 @@ common.expectsError(() => b.write('', 2048), outOfBoundsError);
// throw when writing to negative offset
common.expectsError(() => b.write('a', -1), outOfBoundsError);
-// throw when writing past bounds from the pool
+// Throw when writing past bounds from the pool
common.expectsError(() => b.write('a', 2048), outOfBoundsError);
// throw when writing to negative offset
@@ -290,7 +290,7 @@ Buffer.alloc(1).write('', 1, 0);
assert.strictEqual((Buffer.from('Man')).toString('base64'), 'TWFu');
{
- // test that regular and URL-safe base64 both work
+ // Test that regular and URL-safe base64 both work
const expected = [0xff, 0xff, 0xbe, 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xff];
assert.deepStrictEqual(Buffer.from('//++/++/++//', 'base64'),
Buffer.from(expected));
@@ -319,7 +319,7 @@ 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 ignores whitespace
+ // Check that the base64 decoder ignores whitespace
const expectedWhite = `${expected.slice(0, 60)} \n` +
`${expected.slice(60, 120)} \n` +
`${expected.slice(120, 180)} \n` +
@@ -418,7 +418,7 @@ assert.strictEqual(Buffer.from('KioqKioqKioqKioqKioqKioqKio',
'base64').toString(),
'*'.repeat(20));
-// handle padding graciously, multiple-of-4 or not
+// Handle padding graciously, multiple-of-4 or not
assert.strictEqual(
Buffer.from('72INjkR5fchcxk9+VgdGPFJDxUBFR5/rMFsghgxADiw==', 'base64').length,
32
@@ -762,7 +762,7 @@ assert.strictEqual(x.inspect(), '<Buffer 81 a3 66 6f 6f a3 62 61 72>');
// Call .fill() first, stops valgrind warning about uninitialized memory reads.
Buffer.allocUnsafe(3.3).fill().toString();
-// throws bad argument error in commit 43cb4ec
+// Throws bad argument error in commit 43cb4ec
Buffer.alloc(3.3).fill().toString();
assert.strictEqual(Buffer.allocUnsafe(3.3).length, 3);
assert.strictEqual(Buffer.from({ length: 3.3 }).length, 3);
@@ -808,7 +808,7 @@ common.expectsError(
outOfRangeError
);
-// ensure negative values can't get past offset
+// Ensure negative values can't get past offset
common.expectsError(
() => Buffer.allocUnsafe(8).writeFloatLE(0.0, -1),
outOfRangeError
diff --git a/test/parallel/test-buffer-bytelength.js b/test/parallel/test-buffer-bytelength.js
index 06cdda0b2f..3d419b3165 100644
--- a/test/parallel/test-buffer-bytelength.js
+++ b/test/parallel/test-buffer-bytelength.js
@@ -74,7 +74,7 @@ assert.strictEqual(Buffer.byteLength('∑éllö wørl∂!', 'utf-8'), 19);
assert.strictEqual(Buffer.byteLength('κλμνξο', 'utf8'), 12);
assert.strictEqual(Buffer.byteLength('挵挶挷挸挹', 'utf-8'), 15);
assert.strictEqual(Buffer.byteLength('𠝹𠱓𠱸', 'UTF8'), 12);
-// without an encoding, utf8 should be assumed
+// Without an encoding, utf8 should be assumed
assert.strictEqual(Buffer.byteLength('hey there'), 9);
assert.strictEqual(Buffer.byteLength('𠱸挶νξ#xx :)'), 17);
assert.strictEqual(Buffer.byteLength('hello world', ''), 11);
diff --git a/test/parallel/test-buffer-copy.js b/test/parallel/test-buffer-copy.js
index 82b71a1dd8..ec227a9374 100644
--- a/test/parallel/test-buffer-copy.js
+++ b/test/parallel/test-buffer-copy.js
@@ -37,7 +37,7 @@ let cntr = 0;
}
{
- // copy c into b, without specifying sourceEnd
+ // Copy c into b, without specifying sourceEnd
b.fill(++cntr);
c.fill(++cntr);
const copied = c.copy(b, 0, 0);
@@ -48,7 +48,7 @@ let cntr = 0;
}
{
- // copy c into b, without specifying sourceStart
+ // Copy c into b, without specifying sourceStart
b.fill(++cntr);
c.fill(++cntr);
const copied = c.copy(b, 0);
@@ -135,7 +135,7 @@ common.expectsError(
// When sourceStart is greater than sourceEnd, zero copied
assert.strictEqual(b.copy(c, 0, 100, 10), 0);
-// when targetStart > targetLength, zero copied
+// When targetStart > targetLength, zero copied
assert.strictEqual(b.copy(c, 512, 0, 10), 0);
// Test that the `target` can be a Uint8Array.
diff --git a/test/parallel/test-buffer-includes.js b/test/parallel/test-buffer-includes.js
index 006961173d..2a163f9e0c 100644
--- a/test/parallel/test-buffer-includes.js
+++ b/test/parallel/test-buffer-includes.js
@@ -287,7 +287,7 @@ for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
);
});
-// test truncation of Number arguments to uint8
+// Test truncation of Number arguments to uint8
{
const buf = Buffer.from('this is a test');
assert.ok(buf.includes(0x6973));
diff --git a/test/parallel/test-buffer-indexof.js b/test/parallel/test-buffer-indexof.js
index 32176fe03c..0f7d782436 100644
--- a/test/parallel/test-buffer-indexof.js
+++ b/test/parallel/test-buffer-indexof.js
@@ -175,7 +175,7 @@ assert.strictEqual(
);
-// test optional offset with passed encoding
+// Test optional offset with passed encoding
assert.strictEqual(Buffer.from('aaaa0').indexOf('30', 'hex'), 4);
assert.strictEqual(Buffer.from('aaaa00a').indexOf('3030', 'hex'), 4);
@@ -581,7 +581,7 @@ assert.strictEqual(reallyLong.lastIndexOf(pattern), 3932160);
pattern = reallyLong.slice(0, 2000000); // first 2/5ths.
assert.strictEqual(reallyLong.lastIndexOf(pattern), 0);
-// test truncation of Number arguments to uint8
+// Test truncation of Number arguments to uint8
{
const buf = Buffer.from('this is a test');
assert.strictEqual(buf.indexOf(0x6973), 3);
diff --git a/test/parallel/test-buffer-read.js b/test/parallel/test-buffer-read.js
index 4c9f92259d..1adf030356 100644
--- a/test/parallel/test-buffer-read.js
+++ b/test/parallel/test-buffer-read.js
@@ -21,7 +21,7 @@ read(buf, 'readDoubleLE', [1], -6.966010051009108e+144);
read(buf, 'readFloatBE', [1], -1.6691549692541768e+37);
read(buf, 'readFloatLE', [1], -7861303808);
-// testing basic functionality of readInt8()
+// Testing basic functionality of readInt8()
read(buf, 'readInt8', [1], -3);
// Testing basic functionality of readInt16BE() and readInt16LE()
@@ -36,7 +36,7 @@ read(buf, 'readInt32LE', [1], -806729475);
read(buf, 'readIntBE', [1, 1], -3);
read(buf, 'readIntLE', [2, 1], 0x48);
-// testing basic functionality of readUInt8()
+// Testing basic functionality of readUInt8()
read(buf, 'readUInt8', [1], 0xfd);
// Testing basic functionality of readUInt16BE() and readUInt16LE()
diff --git a/test/parallel/test-buffer-slow.js b/test/parallel/test-buffer-slow.js
index 99362add3b..1b8de44299 100644
--- a/test/parallel/test-buffer-slow.js
+++ b/test/parallel/test-buffer-slow.js
@@ -39,7 +39,7 @@ try {
assert.strictEqual(e.name, 'RangeError');
}
-// should work with number-coercible values
+// Should work with number-coercible values
assert.strictEqual(SlowBuffer('6').length, 6);
assert.strictEqual(SlowBuffer(true).length, 1);
diff --git a/test/parallel/test-buffer-tostring-range.js b/test/parallel/test-buffer-tostring-range.js
index a06163bac2..9cda0d8335 100644
--- a/test/parallel/test-buffer-tostring-range.js
+++ b/test/parallel/test-buffer-tostring-range.js
@@ -11,13 +11,13 @@ assert.strictEqual(rangeBuffer.toString('ascii', +Infinity), '');
assert.strictEqual(rangeBuffer.toString('ascii', 3.14, 3), '');
assert.strictEqual(rangeBuffer.toString('ascii', 'Infinity', 3), '');
-// if end <= 0, empty string will be returned
+// If end <= 0, empty string will be returned
assert.strictEqual(rangeBuffer.toString('ascii', 1, 0), '');
assert.strictEqual(rangeBuffer.toString('ascii', 1, -1.2), '');
assert.strictEqual(rangeBuffer.toString('ascii', 1, -100), '');
assert.strictEqual(rangeBuffer.toString('ascii', 1, -Infinity), '');
-// if start < 0, start will be taken as zero
+// If start < 0, start will be taken as zero
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');
@@ -78,12 +78,12 @@ assert.strictEqual(rangeBuffer.toString('ascii', 0, '-1.99'), '');
assert.strictEqual(rangeBuffer.toString('ascii', 0, 1.99), 'a');
assert.strictEqual(rangeBuffer.toString('ascii', 0, true), 'a');
-// try toString() with a object as a encoding
+// Try toString() with an object as an encoding
assert.strictEqual(rangeBuffer.toString({ toString: function() {
return 'ascii';
} }), 'abc');
-// try toString() with 0 and null as the encoding
+// Try toString() with 0 and null as the encoding
common.expectsError(() => {
rangeBuffer.toString(0, 1, 2);
}, {
diff --git a/test/parallel/test-child-process-disconnect.js b/test/parallel/test-child-process-disconnect.js
index a1aebf1e08..8ca39b5790 100644
--- a/test/parallel/test-child-process-disconnect.js
+++ b/test/parallel/test-child-process-disconnect.js
@@ -71,7 +71,7 @@ if (process.argv[2] === 'child') {
let childFlag = false;
let parentFlag = false;
- // when calling .disconnect the event should emit
+ // When calling .disconnect the event should emit
// and the disconnected flag should be true.
child.on('disconnect', common.mustCall(function() {
parentFlag = child.connected;
diff --git a/test/parallel/test-child-process-fork-net.js b/test/parallel/test-child-process-fork-net.js
index 48521a7fda..90ce482309 100644
--- a/test/parallel/test-child-process-fork-net.js
+++ b/test/parallel/test-child-process-fork-net.js
@@ -35,7 +35,7 @@ if (process.argv[2] === 'child') {
console.error(`[${id}] got socket ${m}`);
- // will call .end('end') or .write('write');
+ // Will call .end('end') or .write('write');
socket[m](m);
socket.resume();
diff --git a/test/parallel/test-child-process-silent.js b/test/parallel/test-child-process-silent.js
index ce916306d1..a2ebb3ffeb 100644
--- a/test/parallel/test-child-process-silent.js
+++ b/test/parallel/test-child-process-silent.js
@@ -50,7 +50,7 @@ if (process.argv[2] === 'pipe') {
});
} else {
- // testcase | start parent && child IPC test
+ // Testcase | start parent && child IPC test
// testing: is stderr and stdout piped to parent
const args = [process.argv[1], 'parent'];
diff --git a/test/parallel/test-child-process-stdout-flush-exit.js b/test/parallel/test-child-process-stdout-flush-exit.js
index 679d78269f..cc1fa83fa9 100644
--- a/test/parallel/test-child-process-stdout-flush-exit.js
+++ b/test/parallel/test-child-process-stdout-flush-exit.js
@@ -23,7 +23,7 @@
const common = require('../common');
const assert = require('assert');
-// if child process output to console and exit
+// If child process output to console and exit
if (process.argv[2] === 'child') {
console.log('hello');
for (let i = 0; i < 200; i++) {
diff --git a/test/parallel/test-child-process-validate-stdio.js b/test/parallel/test-child-process-validate-stdio.js
index 5e23a09884..71edc05597 100644
--- a/test/parallel/test-child-process-validate-stdio.js
+++ b/test/parallel/test-child-process-validate-stdio.js
@@ -14,7 +14,7 @@ assert.throws(() => _validateStdio('foo'), expectedError);
// should throw if not a string or array
assert.throws(() => _validateStdio(600), expectedError);
-// should populate stdio with undefined if len < 3
+// Should populate stdio with undefined if len < 3
{
const stdio1 = [];
const result = _validateStdio(stdio1, false);
@@ -24,7 +24,7 @@ assert.throws(() => _validateStdio(600), expectedError);
assert.strictEqual(result.hasOwnProperty('ipcFd'), true);
}
-// should throw if stdio has ipc and sync is true
+// Should throw if stdio has ipc and sync is true
const stdio2 = ['ipc', 'ipc', 'ipc'];
common.expectsError(() => _validateStdio(stdio2, true),
{ code: 'ERR_IPC_SYNC_FORK', type: Error }
diff --git a/test/parallel/test-cli-syntax-eval.js b/test/parallel/test-cli-syntax-eval.js
index cb4c4fd568..31fe2d3449 100644
--- a/test/parallel/test-cli-syntax-eval.js
+++ b/test/parallel/test-cli-syntax-eval.js
@@ -6,7 +6,7 @@ const { exec } = require('child_process');
const node = process.execPath;
-// should throw if -c and -e flags are both passed
+// Should throw if -c and -e flags are both passed
['-c', '--check'].forEach(function(checkFlag) {
['-e', '--eval'].forEach(function(evalFlag) {
const args = [checkFlag, evalFlag, 'foo'];
diff --git a/test/parallel/test-cli-syntax-piped-bad.js b/test/parallel/test-cli-syntax-piped-bad.js
index 64e2d47931..864497e8f7 100644
--- a/test/parallel/test-cli-syntax-piped-bad.js
+++ b/test/parallel/test-cli-syntax-piped-bad.js
@@ -6,7 +6,7 @@ const { spawnSync } = require('child_process');
const node = process.execPath;
-// test both sets of arguments that check syntax
+// Test both sets of arguments that check syntax
const syntaxArgs = [
['-c'],
['--check']
diff --git a/test/parallel/test-cli-syntax-piped-good.js b/test/parallel/test-cli-syntax-piped-good.js
index 79716fcf39..b3467b0372 100644
--- a/test/parallel/test-cli-syntax-piped-good.js
+++ b/test/parallel/test-cli-syntax-piped-good.js
@@ -6,7 +6,7 @@ const { spawnSync } = require('child_process');
const node = process.execPath;
-// test both sets of arguments that check syntax
+// Test both sets of arguments that check syntax
const syntaxArgs = [
['-c'],
['--check']
diff --git a/test/parallel/test-cluster-disconnect-idle-worker.js b/test/parallel/test-cluster-disconnect-idle-worker.js
index 5b7e73ba07..63b8b925da 100644
--- a/test/parallel/test-cluster-disconnect-idle-worker.js
+++ b/test/parallel/test-cluster-disconnect-idle-worker.js
@@ -26,7 +26,7 @@ const cluster = require('cluster');
const fork = cluster.fork;
if (cluster.isMaster) {
- fork(); // it is intentionally called `fork` instead of
+ fork(); // It is intentionally called `fork` instead of
fork(); // `cluster.fork` to test that `this` is not used
cluster.disconnect(common.mustCall(() => {
assert.deepStrictEqual(Object.keys(cluster.workers), []);
diff --git a/test/parallel/test-cluster-disconnect.js b/test/parallel/test-cluster-disconnect.js
index 1528233eb3..36def06a4c 100644
--- a/test/parallel/test-cluster-disconnect.js
+++ b/test/parallel/test-cluster-disconnect.js
@@ -52,7 +52,7 @@ if (cluster.isWorker) {
});
};
- // test both servers created in the cluster
+ // Test both servers created in the cluster
const testCluster = (cb) => {
let done = 0;
const portsArray = Array.from(serverPorts);
diff --git a/test/parallel/test-cluster-eaccess.js b/test/parallel/test-cluster-eaccess.js
index d6cccca5f3..7a3bc1c5cd 100644
--- a/test/parallel/test-cluster-eaccess.js
+++ b/test/parallel/test-cluster-eaccess.js
@@ -38,7 +38,7 @@ if (cluster.isMaster && process.argv.length !== 3) {
const PIPE_NAME = common.PIPE;
const worker = cluster.fork({ PIPE_NAME });
- // makes sure master is able to fork the worker
+ // Makes sure master is able to fork the worker
cluster.on('fork', common.mustCall());
// makes sure the worker is ready
@@ -57,14 +57,14 @@ if (cluster.isMaster && process.argv.length !== 3) {
// 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
+ // Message child process so that it can exit
cp.send('end');
- // inform master about the unexpected situation
+ // Inform master about the unexpected situation
process.send('PIPE should have been in use.');
});
server.on('error', function(err) {
- // message to child process tells it to exit
+ // Message to child process tells it to exit
cp.send('end');
// propagate error to parent
process.send(err);
diff --git a/test/parallel/test-cluster-master-kill.js b/test/parallel/test-cluster-master-kill.js
index 4e21d8e906..2cc8003981 100644
--- a/test/parallel/test-cluster-master-kill.js
+++ b/test/parallel/test-cluster-master-kill.js
@@ -64,7 +64,7 @@ if (cluster.isWorker) {
let alive = true;
master.on('exit', common.mustCall((code) => {
- // make sure that the master died on purpose
+ // Make sure that the master died on purpose
assert.strictEqual(code, 0);
// check worker process status
diff --git a/test/parallel/test-cluster-worker-kill.js b/test/parallel/test-cluster-worker-kill.js
index bb2d3495d9..1f2978bdb5 100644
--- a/test/parallel/test-cluster-worker-kill.js
+++ b/test/parallel/test-cluster-worker-kill.js
@@ -67,7 +67,7 @@ if (cluster.isWorker) {
// start worker
const worker = cluster.fork();
- // when the worker is up and running, kill it
+ // When the worker is up and running, kill it
worker.once('listening', common.mustCall(() => {
worker.process.kill(KILL_SIGNAL);
}));
diff --git a/test/parallel/test-cluster-worker-no-exit.js b/test/parallel/test-cluster-worker-no-exit.js
index d3ee67994b..7325759741 100644
--- a/test/parallel/test-cluster-worker-no-exit.js
+++ b/test/parallel/test-cluster-worker-no-exit.js
@@ -50,7 +50,7 @@ if (cluster.isMaster) {
destroyed = true;
}, 1000);
}).once('exit', function() {
- // worker should not exit while it has a connection
+ // Worker should not exit while it has a connection
assert(destroyed, 'worker exited before connection destroyed');
success = true;
});
diff --git a/test/parallel/test-cluster-worker-wait-server-close.js b/test/parallel/test-cluster-worker-wait-server-close.js
index 849591e573..ad3320327a 100644
--- a/test/parallel/test-cluster-worker-wait-server-close.js
+++ b/test/parallel/test-cluster-worker-wait-server-close.js
@@ -24,7 +24,7 @@ if (cluster.isWorker) {
// Check worker events and properties
process.once('disconnect', function() {
- // disconnect should occur after socket close
+ // Disconnect should occur after socket close
assert(serverClosed);
clearInterval(keepOpen);
});
diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js
index e94b602065..4a7a2fda68 100644
--- a/test/parallel/test-console.js
+++ b/test/parallel/test-console.js
@@ -145,7 +145,7 @@ console.dirxml(
// test console.trace()
console.trace('This is a %j %d', { formatted: 'trace' }, 10, 'foo');
-// test console.time() and console.timeEnd() output
+// Test console.time() and console.timeEnd() output
console.time('label');
console.timeEnd('label');
diff --git a/test/parallel/test-constants.js b/test/parallel/test-constants.js
index 945443d886..e68f972d36 100644
--- a/test/parallel/test-constants.js
+++ b/test/parallel/test-constants.js
@@ -19,7 +19,7 @@ assert.ok(binding.crypto);
assert.strictEqual(binding[l][k][j], constants[j]);
});
}
- if (l !== 'os') { // top level os constant isn't currently copied
+ if (l !== 'os') { // Top level os constant isn't currently copied
assert.strictEqual(binding[l][k], constants[k]);
}
});
diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js
index 414404511f..c1abf12b8b 100644
--- a/test/parallel/test-crypto-authenticated.js
+++ b/test/parallel/test-crypto-authenticated.js
@@ -199,7 +199,7 @@ for (const test of TEST_CASES) {
}
{
- // trying to get tag before inputting all data:
+ // Trying to get tag before inputting all data:
const encrypt = crypto.createCipheriv(test.algo,
Buffer.from(test.key, 'hex'),
Buffer.from(test.iv, 'hex'),
@@ -209,7 +209,7 @@ for (const test of TEST_CASES) {
}
{
- // trying to create cipher with incorrect IV length
+ // Trying to create cipher with incorrect IV length
assert.throws(function() {
crypto.createCipheriv(
test.algo,
diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js
index 228e2cc8ab..bb0247bf58 100644
--- a/test/parallel/test-crypto-binary-default.js
+++ b/test/parallel/test-crypto-binary-default.js
@@ -465,7 +465,7 @@ function testCipher1(key) {
const plaintext = 'Keep this a secret? No! Tell everyone about node.js!';
const cipher = crypto.createCipher('aes192', key);
- // encrypt plaintext which is in utf8 format
+ // Encrypt plaintext which is in utf8 format
// to a ciphertext which will be in hex
let ciph = cipher.update(plaintext, 'utf8', 'hex');
// Only use binary or hex, not base64.
@@ -488,7 +488,7 @@ function testCipher2(key) {
'jAfaFg**';
const cipher = crypto.createCipher('aes256', key);
- // encrypt plaintext which is in utf8 format
+ // Encrypt plaintext which is in utf8 format
// to a ciphertext which will be in Base64
let ciph = cipher.update(plaintext, 'utf8', 'base64');
ciph += cipher.final('base64');
diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js
index dfa01e2422..9f79abc705 100644
--- a/test/parallel/test-crypto-cipher-decipher.js
+++ b/test/parallel/test-crypto-cipher-decipher.js
@@ -24,7 +24,7 @@ function testCipher1(key) {
const plaintext = 'Keep this a secret? No! Tell everyone about node.js!';
const cipher = crypto.createCipher('aes192', key);
- // encrypt plaintext which is in utf8 format
+ // Encrypt plaintext which is in utf8 format
// to a ciphertext which will be in hex
let ciph = cipher.update(plaintext, 'utf8', 'hex');
// Only use binary or hex, not base64.
@@ -61,7 +61,7 @@ function testCipher2(key) {
'jAfaFg**';
const cipher = crypto.createCipher('aes256', key);
- // encrypt plaintext which is in utf8 format
+ // Encrypt plaintext which is in utf8 format
// to a ciphertext which will be in Base64
let ciph = cipher.update(plaintext, 'utf8', 'base64');
ciph += cipher.final('base64');
diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js
index 8e584100d9..5a63667c99 100644
--- a/test/parallel/test-crypto-dh.js
+++ b/test/parallel/test-crypto-dh.js
@@ -374,7 +374,7 @@ if (availableCurves.has('prime256v1') && availableHashes.has('sha256')) {
crypto.createSign('SHA256').sign(ecPrivateKey);
}
-// invalid test: curve argument is undefined
+// Invalid test: curve argument is undefined
common.expectsError(
() => crypto.createECDH(),
{
diff --git a/test/parallel/test-crypto-from-binary.js b/test/parallel/test-crypto-from-binary.js
index 70bac93a99..56d0cb7207 100644
--- a/test/parallel/test-crypto-from-binary.js
+++ b/test/parallel/test-crypto-from-binary.js
@@ -42,7 +42,7 @@ while (ucs2_control.length <= EXTERN_APEX) {
}
-// check resultant buffer and output string
+// Check resultant buffer and output string
const b = Buffer.from(ucs2_control + ucs2_control, 'ucs2');
//
diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js
index 60904cf08f..de15f00bc9 100644
--- a/test/parallel/test-crypto-hash.js
+++ b/test/parallel/test-crypto-hash.js
@@ -81,7 +81,7 @@ assert.deepStrictEqual(
`${cryptoType} with ${digest} digest failed to evaluate to expected hash`
);
-// stream interface should produce the same result.
+// Stream interface should produce the same result.
assert.deepStrictEqual(a5, a3);
assert.deepStrictEqual(a6, a3);
assert.notStrictEqual(a7, undefined);
diff --git a/test/parallel/test-crypto-random.js b/test/parallel/test-crypto-random.js
index 4c85545b4e..deacb45e8f 100644
--- a/test/parallel/test-crypto-random.js
+++ b/test/parallel/test-crypto-random.js
@@ -33,7 +33,7 @@ const { kMaxLength } = require('buffer');
const kMaxUint32 = Math.pow(2, 32) - 1;
const kMaxPossibleLength = Math.min(kMaxLength, kMaxUint32);
-// bump, we register a lot of exit listeners
+// Bump, we register a lot of exit listeners
process.setMaxListeners(256);
common.expectWarning('DeprecationWarning',
diff --git a/test/parallel/test-domain-http-server.js b/test/parallel/test-domain-http-server.js
index 47e87b34be..5b1ef68106 100644
--- a/test/parallel/test-domain-http-server.js
+++ b/test/parallel/test-domain-http-server.js
@@ -40,7 +40,7 @@ const server = http.createServer(function(req, res) {
dom.on('error', function(er) {
serverCaught++;
console.log('horray! got a server error', er);
- // try to send a 500. If that fails, oh well.
+ // Try to send a 500. If that fails, oh well.
res.writeHead(500, { 'content-type': 'text/plain' });
res.end(er.stack || er.message || 'Unknown error');
});
@@ -50,7 +50,7 @@ const server = http.createServer(function(req, res) {
// if you request 'baz', then it'll throw a JSON circular ref error.
const data = JSON.stringify(objects[req.url.replace(/[^a-z]/g, '')]);
- // this line will throw if you pick an unknown key
+ // This line will throw if you pick an unknown key
assert.notStrictEqual(data, undefined);
res.writeHead(200);
diff --git a/test/parallel/test-fs-append-file-sync.js b/test/parallel/test-fs-append-file-sync.js
index c38a07fef7..e053d06161 100644
--- a/test/parallel/test-fs-append-file-sync.js
+++ b/test/parallel/test-fs-append-file-sync.js
@@ -48,7 +48,7 @@ const fileData = fs.readFileSync(filename);
assert.strictEqual(Buffer.byteLength(data), fileData.length);
-// test that appends data to a non empty file
+// Test that appends data to a non empty file
const filename2 = join(tmpdir.path, 'append-sync2.txt');
fs.writeFileSync(filename2, currentFileData);
@@ -59,7 +59,7 @@ const fileData2 = fs.readFileSync(filename2);
assert.strictEqual(Buffer.byteLength(data) + currentFileData.length,
fileData2.length);
-// test that appendFileSync accepts buffers
+// Test that appendFileSync accepts buffers
const filename3 = join(tmpdir.path, 'append-sync3.txt');
fs.writeFileSync(filename3, currentFileData);
@@ -87,7 +87,7 @@ const fileData4 = fs.readFileSync(filename4);
assert.strictEqual(Buffer.byteLength(String(num)) + currentFileData.length,
fileData4.length);
-// test that appendFile accepts file descriptors
+// Test that appendFile accepts file descriptors
const filename5 = join(tmpdir.path, 'append-sync5.txt');
fs.writeFileSync(filename5, currentFileData);
diff --git a/test/parallel/test-fs-long-path.js b/test/parallel/test-fs-long-path.js
index 74f63868b8..11ec4d56fc 100644
--- a/test/parallel/test-fs-long-path.js
+++ b/test/parallel/test-fs-long-path.js
@@ -30,7 +30,7 @@ const assert = require('assert');
const tmpdir = require('../common/tmpdir');
-// make a path that will be at least 260 chars long.
+// Make a path that will be at least 260 chars long.
const fileNameLen = Math.max(260 - tmpdir.path.length - 1, 1);
const fileName = path.join(tmpdir.path, 'x'.repeat(fileNameLen));
const fullPath = path.resolve(fileName);
diff --git a/test/parallel/test-fs-mkdir.js b/test/parallel/test-fs-mkdir.js
index d07aab5376..f2ed9b9f68 100644
--- a/test/parallel/test-fs-mkdir.js
+++ b/test/parallel/test-fs-mkdir.js
@@ -33,7 +33,7 @@ function nextdir() {
return `test${++dirc}`;
}
-// mkdir creates directory using assigned path
+// fs.mkdir creates directory using assigned path
{
const pathname = path.join(tmpdir.path, nextdir());
@@ -43,7 +43,7 @@ function nextdir() {
}));
}
-// mkdir creates directory with assigned mode value
+// fs.mkdir creates directory with assigned mode value
{
const pathname = path.join(tmpdir.path, nextdir());
diff --git a/test/parallel/test-fs-promises.js b/test/parallel/test-fs-promises.js
index c4143fbb9b..749e0a6f08 100644
--- a/test/parallel/test-fs-promises.js
+++ b/test/parallel/test-fs-promises.js
@@ -254,7 +254,7 @@ async function getHandle(dest) {
await unlink(newLink);
}
- // testing readdir lists both files and directories
+ // Testing readdir lists both files and directories
{
const newDir = path.resolve(tmpDir, 'dir');
const newFile = path.resolve(tmpDir, 'foo.js');
@@ -326,8 +326,8 @@ async function getHandle(dest) {
assert(stats.isDirectory());
}
- // mkdirp require recursive option to be a boolean.
- // Anything else generates an error.
+ // fs.mkdirp requires the recursive option to be of type boolean.
+ // Everything else generates an error.
{
const dir = path.join(tmpDir, nextdir(), nextdir());
['', 1, {}, [], null, Symbol('test'), () => {}].forEach((recursive) => {
diff --git a/test/parallel/test-fs-readfile-pipe-large.js b/test/parallel/test-fs-readfile-pipe-large.js
index 740a3876a2..b2b5192c78 100644
--- a/test/parallel/test-fs-readfile-pipe-large.js
+++ b/test/parallel/test-fs-readfile-pipe-large.js
@@ -1,7 +1,7 @@
'use strict';
const common = require('../common');
-// simulate `cat readfile.js | node readfile.js`
+// Simulate `cat readfile.js | node readfile.js`
if (common.isWindows || common.isAIX)
common.skip(`No /dev/stdin on ${process.platform}.`);
diff --git a/test/parallel/test-fs-readfile-pipe.js b/test/parallel/test-fs-readfile-pipe.js
index c9f7144c11..861ce20cfc 100644
--- a/test/parallel/test-fs-readfile-pipe.js
+++ b/test/parallel/test-fs-readfile-pipe.js
@@ -22,7 +22,7 @@
'use strict';
const common = require('../common');
-// simulate `cat readfile.js | node readfile.js`
+// Simulate `cat readfile.js | node readfile.js`
if (common.isWindows || common.isAIX)
common.skip(`No /dev/stdin on ${process.platform}.`);
diff --git a/test/parallel/test-fs-readfile-zero-byte-liar.js b/test/parallel/test-fs-readfile-zero-byte-liar.js
index ec0b9cf692..a3ba3985ab 100644
--- a/test/parallel/test-fs-readfile-zero-byte-liar.js
+++ b/test/parallel/test-fs-readfile-zero-byte-liar.js
@@ -29,7 +29,7 @@ const fs = require('fs');
const dataExpected = fs.readFileSync(__filename, 'utf8');
-// sometimes stat returns size=0, but it's a lie.
+// Sometimes stat returns size=0, but it's a lie.
fs._fstat = fs.fstat;
fs._fstatSync = fs.fstatSync;
diff --git a/test/parallel/test-fs-readfilesync-pipe-large.js b/test/parallel/test-fs-readfilesync-pipe-large.js
index cfa7ae06ac..f8ad5a6331 100644
--- a/test/parallel/test-fs-readfilesync-pipe-large.js
+++ b/test/parallel/test-fs-readfilesync-pipe-large.js
@@ -1,7 +1,7 @@
'use strict';
const common = require('../common');
-// simulate `cat readfile.js | node readfile.js`
+// Simulate `cat readfile.js | node readfile.js`
if (common.isWindows || common.isAIX)
common.skip(`No /dev/stdin on ${process.platform}.`);
diff --git a/test/parallel/test-fs-watchfile-bigint.js b/test/parallel/test-fs-watchfile-bigint.js
index 76c619260e..d5528bb2d3 100644
--- a/test/parallel/test-fs-watchfile-bigint.js
+++ b/test/parallel/test-fs-watchfile-bigint.js
@@ -52,7 +52,7 @@ const watcher =
assert(prev.ino <= 0n);
// Stop watching the file
fs.unwatchFile(enoentFile);
- watcher.stop(); // stopping a stopped watcher should be a noop
+ watcher.stop(); // Stopping a stopped watcher should be a noop
}
}, 2));
@@ -60,4 +60,4 @@ const watcher =
// not trigger a 'stop' event.
watcher.on('stop', common.mustCall(function onStop() {}));
-watcher.start(); // starting a started watcher should be a noop
+watcher.start(); // Starting a started watcher should be a noop
diff --git a/test/parallel/test-fs-watchfile.js b/test/parallel/test-fs-watchfile.js
index b3618792cd..0b28e0331d 100644
--- a/test/parallel/test-fs-watchfile.js
+++ b/test/parallel/test-fs-watchfile.js
@@ -74,7 +74,7 @@ const watcher =
assert(prev.ino <= 0);
// Stop watching the file
fs.unwatchFile(enoentFile);
- watcher.stop(); // stopping a stopped watcher should be a noop
+ watcher.stop(); // Stopping a stopped watcher should be a noop
}
}, 2));
@@ -82,7 +82,7 @@ const watcher =
// not trigger a 'stop' event.
watcher.on('stop', common.mustCall(function onStop() {}));
-watcher.start(); // starting a started watcher should be a noop
+watcher.start(); // Starting a started watcher should be a noop
// Watch events should callback with a filename on supported systems.
// Omitting AIX. It works but not reliably.
diff --git a/test/parallel/test-fs-write-file.js b/test/parallel/test-fs-write-file.js
index b137e55547..7f0ec116f1 100644
--- a/test/parallel/test-fs-write-file.js
+++ b/test/parallel/test-fs-write-file.js
@@ -82,7 +82,7 @@ fs.writeFile(filename3, n, { mode: m }, common.mustCall(function(e) {
}));
}));
-// test that writeFile accepts file descriptors
+// Test that writeFile accepts file descriptors
const filename4 = join(tmpdir.path, 'test4.txt');
fs.open(filename4, 'w+', common.mustCall(function(e, fd) {
diff --git a/test/parallel/test-http-addrequest-localaddress.js b/test/parallel/test-http-addrequest-localaddress.js
index ce2ae8d12e..5e4da01ab4 100644
--- a/test/parallel/test-http-addrequest-localaddress.js
+++ b/test/parallel/test-http-addrequest-localaddress.js
@@ -15,17 +15,16 @@ const req = {
agent.maxSockets = 0;
-// localAddress is used when naming requests / sockets
-// while using the Legacy API
-// port 8080 is hardcoded since this does not create a network connection
+// `localAddress` is used when naming requests / sockets while using the Legacy
+// API. Port 8080 is hardcoded since this does not create a network connection.
agent.addRequest(req, 'localhost', 8080, '127.0.0.1');
assert.strictEqual(Object.keys(agent.requests).length, 1);
assert.strictEqual(
Object.keys(agent.requests)[0],
'localhost:8080:127.0.0.1');
-// path is *not* used when naming requests / sockets
-// port 8080 is hardcoded since this does not create a network connection
+// `path` is *not* used when naming requests / sockets.
+// Port 8080 is hardcoded since this does not create a network connection
agent.addRequest(req, {
host: 'localhost',
port: 8080,
diff --git a/test/parallel/test-http-agent-destroyed-socket.js b/test/parallel/test-http-agent-destroyed-socket.js
index 7dbc1db9f9..145dc48424 100644
--- a/test/parallel/test-http-agent-destroyed-socket.js
+++ b/test/parallel/test-http-agent-destroyed-socket.js
@@ -49,7 +49,7 @@ const server = http.createServer(common.mustCall((req, res) => {
request1.socket.destroy();
response.socket.once('close', common.mustCall(() => {
- // assert request2 was removed from the queue
+ // Assert request2 was removed from the queue
assert(!agent.requests[key]);
process.nextTick(() => {
// Assert that the same socket was not assigned to request2,
diff --git a/test/parallel/test-http-agent-keepalive.js b/test/parallel/test-http-agent-keepalive.js
index 917c4ee810..4d682a89ab 100644
--- a/test/parallel/test-http-agent-keepalive.js
+++ b/test/parallel/test-http-agent-keepalive.js
@@ -39,7 +39,7 @@ const server = http.createServer(common.mustCall((req, res) => {
res.destroy();
return;
} else if (req.url === '/remote_close') {
- // cache the socket, close it after a short delay
+ // Cache the socket, close it after a short delay
const socket = res.connection;
setImmediate(common.mustCall(() => socket.end()));
}
diff --git a/test/parallel/test-http-client-pipe-end.js b/test/parallel/test-http-client-pipe-end.js
index 9aa645b12a..ee88ce3d96 100644
--- a/test/parallel/test-http-client-pipe-end.js
+++ b/test/parallel/test-http-client-pipe-end.js
@@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
-// see https://github.com/joyent/node/issues/3257
+// See https://github.com/joyent/node/issues/3257
const common = require('../common');
const http = require('http');
diff --git a/test/parallel/test-http-incoming-matchKnownFields.js b/test/parallel/test-http-incoming-matchKnownFields.js
index 14ba8acd02..4402cc519a 100644
--- a/test/parallel/test-http-incoming-matchKnownFields.js
+++ b/test/parallel/test-http-incoming-matchKnownFields.js
@@ -7,7 +7,7 @@ function checkDest(field, result, value) {
const dest = {};
const incomingMessage = new IncomingMessage(field);
- // dest is changed by IncomingMessage._addHeaderLine
+ // Dest is changed by IncomingMessage._addHeaderLine
if (value)
incomingMessage._addHeaderLine(field, 'test', dest);
incomingMessage._addHeaderLine(field, value, dest);
diff --git a/test/parallel/test-http-incoming-pipelined-socket-destroy.js b/test/parallel/test-http-incoming-pipelined-socket-destroy.js
index 8e63bdb8a9..c3aa86fc74 100644
--- a/test/parallel/test-http-incoming-pipelined-socket-destroy.js
+++ b/test/parallel/test-http-incoming-pipelined-socket-destroy.js
@@ -45,7 +45,7 @@ const server = http.createServer(common.mustCall(function(req, res) {
server.emit('requestDone');
});
- // in one case, actually send a response in 2 chunks
+ // In one case, actually send a response in 2 chunks
case '/3':
res.write('hello ');
return setImmediate(function() {
@@ -78,7 +78,7 @@ server.listen(0, common.mustCall(function() {
countdown.dec();
});
- // immediately write the pipelined requests.
+ // Immediately write the pipelined requests.
// Some of these will not have a socket to destroy!
client.write(generator(seeds));
}));
diff --git a/test/parallel/test-http-outgoing-finish.js b/test/parallel/test-http-outgoing-finish.js
index 1fcd7cd076..d5b94eb0f6 100644
--- a/test/parallel/test-http-outgoing-finish.js
+++ b/test/parallel/test-http-outgoing-finish.js
@@ -48,7 +48,7 @@ function write(out) {
let finishEvent = false;
let endCb = false;
- // first, write until it gets some backpressure
+ // First, write until it gets some backpressure
while (out.write(buf)) {}
// Now end, and make sure that we don't get the 'finish' event
diff --git a/test/parallel/test-http-outgoing-settimeout.js b/test/parallel/test-http-outgoing-settimeout.js
index 3dd2768615..6e46973bc1 100644
--- a/test/parallel/test-http-outgoing-settimeout.js
+++ b/test/parallel/test-http-outgoing-settimeout.js
@@ -17,7 +17,7 @@ const { OutgoingMessage } = require('http');
}
{
- // tests for settimeout method without socket
+ // Tests for settimeout method without socket
const expectedMsecs = 23;
const outgoingMessage = new OutgoingMessage();
outgoingMessage.setTimeout(expectedMsecs);
diff --git a/test/parallel/test-http-readable-data-event.js b/test/parallel/test-http-readable-data-event.js
index 1c48a451ef..ddaeca5fe7 100644
--- a/test/parallel/test-http-readable-data-event.js
+++ b/test/parallel/test-http-readable-data-event.js
@@ -13,7 +13,7 @@ const server = http.createServer((req, res) => {
'Content-Length': '' + (helloWorld.length + helloAgainLater.length)
});
- // we need to make sure the data is flushed
+ // We need to make sure the data is flushed
// before writing again
next = () => {
res.end(helloAgainLater);
diff --git a/test/parallel/test-http-res-write-end-dont-take-array.js b/test/parallel/test-http-res-write-end-dont-take-array.js
index 72268efcae..39ac800d0d 100644
--- a/test/parallel/test-http-res-write-end-dont-take-array.js
+++ b/test/parallel/test-http-res-write-end-dont-take-array.js
@@ -61,7 +61,7 @@ server.once('request', common.mustCall((req, res) => {
}));
server.listen(0, function() {
- // just make a request, other tests handle responses
+ // Just make a request, other tests handle responses
http.get({ port: this.address().port }, (res) => {
res.resume();
// do it again to test .end(Buffer);
diff --git a/test/parallel/test-http-set-timeout-server.js b/test/parallel/test-http-set-timeout-server.js
index 7984fdfc0f..793046e57f 100644
--- a/test/parallel/test-http-set-timeout-server.js
+++ b/test/parallel/test-http-set-timeout-server.js
@@ -58,7 +58,7 @@ test(function serverTimeout(cb) {
test(function serverRequestTimeout(cb) {
const server = http.createServer(common.mustCall((req, res) => {
- // just do nothing, we should get a timeout event.
+ // Just do nothing, we should get a timeout event.
const s = req.setTimeout(50, common.mustCall((socket) => {
socket.destroy();
server.close();
@@ -79,7 +79,7 @@ test(function serverRequestTimeout(cb) {
test(function serverResponseTimeout(cb) {
const server = http.createServer(common.mustCall((req, res) => {
- // just do nothing, we should get a timeout event.
+ // Just do nothing, we should get a timeout event.
const s = res.setTimeout(50, common.mustCall((socket) => {
socket.destroy();
server.close();
@@ -96,7 +96,7 @@ test(function serverResponseTimeout(cb) {
test(function serverRequestNotTimeoutAfterEnd(cb) {
const server = http.createServer(common.mustCall((req, res) => {
- // just do nothing, we should get a timeout event.
+ // Just do nothing, we should get a timeout event.
const s = req.setTimeout(50, common.mustNotCall());
assert.ok(s instanceof http.IncomingMessage);
res.on('timeout', common.mustCall());
diff --git a/test/parallel/test-http-set-trailers.js b/test/parallel/test-http-set-trailers.js
index 74eff427a4..3252ac7fc0 100644
--- a/test/parallel/test-http-set-trailers.js
+++ b/test/parallel/test-http-set-trailers.js
@@ -97,7 +97,7 @@ server.on('listening', function() {
});
});
-// now, see if the client sees the trailers.
+// Now, see if the client sees the trailers.
server.on('listening', function() {
http.get({
port: this.address().port,
diff --git a/test/parallel/test-http-upgrade-server2.js b/test/parallel/test-http-upgrade-server2.js
index a6c142e60a..1a4d4038a5 100644
--- a/test/parallel/test-http-upgrade-server2.js
+++ b/test/parallel/test-http-upgrade-server2.js
@@ -30,7 +30,7 @@ const server = http.createServer(function(req, res) {
});
server.on('upgrade', function(req, socket, upgradeHead) {
- // test that throwing an error from upgrade gets
+ // Test that throwing an error from upgrade gets
// is uncaught
throw new Error('upgrade error');
});
diff --git a/test/parallel/test-http-url.parse-auth-with-header-in-request.js b/test/parallel/test-http-url.parse-auth-with-header-in-request.js
index eb96ac19c1..7a9a486bcc 100644
--- a/test/parallel/test-http-url.parse-auth-with-header-in-request.js
+++ b/test/parallel/test-http-url.parse-auth-with-header-in-request.js
@@ -26,7 +26,7 @@ const http = require('http');
const url = require('url');
function check(request) {
- // the correct authorization header is be passed
+ // The correct authorization header is be passed
assert.strictEqual(request.headers.authorization, 'NoAuthForYOU');
}
diff --git a/test/parallel/test-http-url.parse-auth.js b/test/parallel/test-http-url.parse-auth.js
index ab597e132c..ac09c0e1b8 100644
--- a/test/parallel/test-http-url.parse-auth.js
+++ b/test/parallel/test-http-url.parse-auth.js
@@ -26,7 +26,7 @@ const http = require('http');
const url = require('url');
function check(request) {
- // the correct authorization header is be passed
+ // The correct authorization header is be passed
assert.strictEqual(request.headers.authorization, 'Basic dXNlcjpwYXNzOg==');
}
diff --git a/test/parallel/test-http-url.parse-basic.js b/test/parallel/test-http-url.parse-basic.js
index c900d045d3..e68df80e91 100644
--- a/test/parallel/test-http-url.parse-basic.js
+++ b/test/parallel/test-http-url.parse-basic.js
@@ -33,7 +33,7 @@ function check(request) {
assert.strictEqual(request.method, 'GET');
// There are no URL params, so you should not see any
assert.strictEqual(request.url, '/');
- // the host header should use the url.parse.hostname
+ // The host header should use the url.parse.hostname
assert.strictEqual(request.headers.host,
`${testURL.hostname}:${testURL.port}`);
}
@@ -51,7 +51,7 @@ server.listen(0, function() {
// make the request
const clientRequest = http.request(testURL);
- // since there is a little magic with the agent
+ // Since there is a little magic with the agent
// make sure that an http request uses the http.Agent
assert.ok(clientRequest.agent instanceof http.Agent);
clientRequest.end();
diff --git a/test/parallel/test-http-url.parse-https.request.js b/test/parallel/test-http-url.parse-https.request.js
index f58be0257c..6ca9e51e82 100644
--- a/test/parallel/test-http-url.parse-https.request.js
+++ b/test/parallel/test-http-url.parse-https.request.js
@@ -54,7 +54,7 @@ server.listen(0, function() {
// make the request
const clientRequest = https.request(testURL);
- // since there is a little magic with the agent
+ // Since there is a little magic with the agent
// make sure that the request uses the https.Agent
assert.ok(clientRequest.agent instanceof https.Agent);
clientRequest.end();
diff --git a/test/parallel/test-http-write-head.js b/test/parallel/test-http-write-head.js
index 83dfcfa20b..320359e3ec 100644
--- a/test/parallel/test-http-write-head.js
+++ b/test/parallel/test-http-write-head.js
@@ -41,7 +41,7 @@ const s = http.createServer(common.mustCall((req, res) => {
}
);
- // undefined value should throw, via 979d0ca8
+ // Undefined value should throw, via 979d0ca8
common.expectsError(
() => res.setHeader('foo', undefined),
{
diff --git a/test/parallel/test-http2-client-destroy.js b/test/parallel/test-http2-client-destroy.js
index 0a538e0f9e..6c4adfe5b4 100644
--- a/test/parallel/test-http2-client-destroy.js
+++ b/test/parallel/test-http2-client-destroy.js
@@ -112,7 +112,7 @@ const Countdown = require('../common/countdown');
client.on('close', () => {
server.close();
- // calling destroy in here should not matter
+ // Calling destroy in here should not matter
client.destroy();
});
diff --git a/test/parallel/test-http2-client-onconnect-errors.js b/test/parallel/test-http2-client-onconnect-errors.js
index ab166c22f0..5c08478784 100644
--- a/test/parallel/test-http2-client-onconnect-errors.js
+++ b/test/parallel/test-http2-client-onconnect-errors.js
@@ -14,7 +14,7 @@ const {
const http2 = require('http2');
const { NghttpError } = require('internal/http2/util');
-// tests error handling within requestOnConnect
+// Tests error handling within requestOnConnect
// - NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE (should emit session error)
// - NGHTTP2_ERR_INVALID_ARGUMENT (should emit stream error)
// - every other NGHTTP2 error from binding (should emit session error)
diff --git a/test/parallel/test-http2-client-set-priority.js b/test/parallel/test-http2-client-set-priority.js
index 411b762be8..c41ec99031 100644
--- a/test/parallel/test-http2-client-set-priority.js
+++ b/test/parallel/test-http2-client-set-priority.js
@@ -27,7 +27,7 @@ const checkWeight = (actual, expect) => {
}));
};
-// when client weight is lower than 1, weight is 1
+// When client weight is lower than 1, weight is 1
checkWeight(-1, 1);
checkWeight(0, 1);
diff --git a/test/parallel/test-http2-compat-serverrequest-end.js b/test/parallel/test-http2-compat-serverrequest-end.js
index 45a678d1a9..cee5fa47ad 100644
--- a/test/parallel/test-http2-compat-serverrequest-end.js
+++ b/test/parallel/test-http2-compat-serverrequest-end.js
@@ -18,7 +18,7 @@ server.listen(0, common.mustCall(function() {
request.on('end', common.mustCall(() => {
assert.strictEqual(request.complete, true);
response.on('finish', common.mustCall(function() {
- // the following tests edge cases on request socket
+ // The following tests edge cases on request socket
// right after finished fires but before backing
// Http2Stream is destroyed
assert.strictEqual(request.socket.readable, request.stream.readable);
diff --git a/test/parallel/test-http2-compat-serverresponse-createpushresponse.js b/test/parallel/test-http2-compat-serverresponse-createpushresponse.js
index 1992d41af6..5790a9942c 100644
--- a/test/parallel/test-http2-compat-serverresponse-createpushresponse.js
+++ b/test/parallel/test-http2-compat-serverresponse-createpushresponse.js
@@ -15,7 +15,7 @@ const server = h2.createServer((request, response) => {
assert.strictEqual(response.stream.id % 2, 1);
response.write(servExpect);
- // callback must be specified (and be a function)
+ // Callback must be specified (and be a function)
common.expectsError(
() => response.createPushResponse({
':path': '/pushed',
diff --git a/test/parallel/test-http2-compat-serverresponse-end.js b/test/parallel/test-http2-compat-serverresponse-end.js
index 0e846a5948..d7aaebca3d 100644
--- a/test/parallel/test-http2-compat-serverresponse-end.js
+++ b/test/parallel/test-http2-compat-serverresponse-end.js
@@ -253,7 +253,7 @@ const {
}
{
- // finish should only trigger after 'end' is called
+ // Finish should only trigger after 'end' is called
const server = createServer(mustCall((request, response) => {
let finished = false;
response.writeHead(HTTP_STATUS_OK, { foo: 'bar' });
diff --git a/test/parallel/test-http2-connect.js b/test/parallel/test-http2-connect.js
index 6080dcb90e..bef4ff7960 100644
--- a/test/parallel/test-http2-connect.js
+++ b/test/parallel/test-http2-connect.js
@@ -6,7 +6,7 @@ if (!hasCrypto)
const { createServer, connect } = require('http2');
const { connect: netConnect } = require('net');
-// check for session connect callback and event
+// Check for session connect callback and event
{
const server = createServer();
server.listen(0, mustCall(() => {
diff --git a/test/parallel/test-http2-dont-lose-data.js b/test/parallel/test-http2-dont-lose-data.js
index eb85277b7b..c73208f955 100644
--- a/test/parallel/test-http2-dont-lose-data.js
+++ b/test/parallel/test-http2-dont-lose-data.js
@@ -43,7 +43,7 @@ server.listen(0, () => {
pushStream.on('end', common.mustCall(() => {
assert.strictEqual(pushData, 'a push stream');
- // removing the setImmediate causes the test to pass
+ // Removing the setImmediate causes the test to pass
setImmediate(function() {
let data = '';
req.setEncoding('utf8');
diff --git a/test/parallel/test-http2-info-headers-errors.js b/test/parallel/test-http2-info-headers-errors.js
index 6540747fd2..a55e9df026 100644
--- a/test/parallel/test-http2-info-headers-errors.js
+++ b/test/parallel/test-http2-info-headers-errors.js
@@ -13,7 +13,7 @@ const {
} = internalBinding('http2');
const { NghttpError } = require('internal/http2/util');
-// tests error handling within additionalHeaders
+// Tests error handling within additionalHeaders
// - every other NGHTTP2 error from binding (should emit stream error)
const specificTestKeys = [];
diff --git a/test/parallel/test-http2-misbehaving-multiplex.js b/test/parallel/test-http2-misbehaving-multiplex.js
index b0b501eacb..3df3a6f893 100644
--- a/test/parallel/test-http2-misbehaving-multiplex.js
+++ b/test/parallel/test-http2-misbehaving-multiplex.js
@@ -17,7 +17,7 @@ server.on('stream', common.mustCall((stream) => {
stream.respond();
stream.end('ok');
- // the error will be emitted asynchronously
+ // The error will be emitted asynchronously
stream.on('error', common.expectsError({
type: NghttpError,
code: 'ERR_HTTP2_ERROR',
diff --git a/test/parallel/test-http2-respond-with-fd-errors.js b/test/parallel/test-http2-respond-with-fd-errors.js
index f336d9caac..4e876c532f 100644
--- a/test/parallel/test-http2-respond-with-fd-errors.js
+++ b/test/parallel/test-http2-respond-with-fd-errors.js
@@ -18,7 +18,7 @@ const {
} = internalBinding('http2');
const { NghttpError } = require('internal/http2/util');
-// tests error handling within processRespondWithFD
+// Tests error handling within processRespondWithFD
// (called by respondWithFD & respondWithFile)
// - every other NGHTTP2 error from binding (should emit stream error)
diff --git a/test/parallel/test-http2-server-errors.js b/test/parallel/test-http2-server-errors.js
index bbdf312fc1..eeb9e79682 100644
--- a/test/parallel/test-http2-server-errors.js
+++ b/test/parallel/test-http2-server-errors.js
@@ -59,7 +59,7 @@ const h2 = require('http2');
}));
server.on('stream', common.mustCall(function(stream) {
- // there is no 'error' handler, and this will crash
+ // There is no 'error' handler, and this will crash
stream.write('hello');
stream.resume();
diff --git a/test/parallel/test-http2-window-size.js b/test/parallel/test-http2-window-size.js
index 164a778e1f..adf4534d5b 100644
--- a/test/parallel/test-http2-window-size.js
+++ b/test/parallel/test-http2-window-size.js
@@ -89,7 +89,7 @@ const initialWindowSizeList = [
(1 << 8) - 1,
1 << 8,
1 << 17,
- undefined // use default window size which is (1 << 16) - 1
+ undefined // Use default window size which is (1 << 16) - 1
];
// Call `run` on each element in the cartesian product of buffersList and
diff --git a/test/parallel/test-https-set-timeout-server.js b/test/parallel/test-https-set-timeout-server.js
index e353f0afde..c67155e9d5 100644
--- a/test/parallel/test-https-set-timeout-server.js
+++ b/test/parallel/test-https-set-timeout-server.js
@@ -71,7 +71,7 @@ test(function serverRequestTimeout(cb) {
const server = https.createServer(
serverOptions,
common.mustCall((req, res) => {
- // just do nothing, we should get a timeout event.
+ // Just do nothing, we should get a timeout event.
const s = req.setTimeout(50, common.mustCall((socket) => {
socket.destroy();
server.close();
@@ -95,7 +95,7 @@ test(function serverResponseTimeout(cb) {
const server = https.createServer(
serverOptions,
common.mustCall((req, res) => {
- // just do nothing, we should get a timeout event.
+ // Just do nothing, we should get a timeout event.
const s = res.setTimeout(50, common.mustCall((socket) => {
socket.destroy();
server.close();
@@ -115,7 +115,7 @@ test(function serverRequestNotTimeoutAfterEnd(cb) {
const server = https.createServer(
serverOptions,
common.mustCall((req, res) => {
- // just do nothing, we should get a timeout event.
+ // Just do nothing, we should get a timeout event.
const s = req.setTimeout(50, common.mustNotCall());
assert.ok(s instanceof http.IncomingMessage);
res.on('timeout', common.mustCall());
diff --git a/test/parallel/test-https-strict.js b/test/parallel/test-https-strict.js
index a7f4b80716..f849ae800f 100644
--- a/test/parallel/test-https-strict.js
+++ b/test/parallel/test-https-strict.js
@@ -57,7 +57,7 @@ const cert3 = read('agent3-cert.pem');
const ca1 = read('ca1-cert.pem');
const ca2 = read('ca2-cert.pem');
-// different agents to use different CA lists.
+// Different agents to use different CA lists.
// this api is beyond bad.
const agent0 = new https.Agent();
const agent1 = new https.Agent({ ca: [ca1] });
diff --git a/test/parallel/test-listen-fd-cluster.js b/test/parallel/test-listen-fd-cluster.js
index bc81a8da0b..416adb3935 100644
--- a/test/parallel/test-listen-fd-cluster.js
+++ b/test/parallel/test-listen-fd-cluster.js
@@ -65,7 +65,7 @@ test(function(parent, port) {
s += c.toString();
});
res.on('end', function() {
- // kill the worker before we start doing asserts.
+ // Kill the worker before we start doing asserts.
// it's really annoying when tests leave orphans!
parent.kill();
parent.on('exit', function() {
diff --git a/test/parallel/test-net-keepalive.js b/test/parallel/test-net-keepalive.js
index 49331abf04..9cc08af8fe 100644
--- a/test/parallel/test-net-keepalive.js
+++ b/test/parallel/test-net-keepalive.js
@@ -29,7 +29,7 @@ let clientConnection;
const echoServer = net.createServer(function(connection) {
serverConnection = connection;
setTimeout(common.mustCall(function() {
- // make sure both connections are still open
+ // Make sure both connections are still open
assert.strictEqual(serverConnection.readyState, 'open');
assert.strictEqual(clientConnection.readyState, 'open');
serverConnection.end();
diff --git a/test/parallel/test-net-persistent-keepalive.js b/test/parallel/test-net-persistent-keepalive.js
index 8756cd7d1b..85a2950273 100644
--- a/test/parallel/test-net-persistent-keepalive.js
+++ b/test/parallel/test-net-persistent-keepalive.js
@@ -8,7 +8,7 @@ let clientConnection;
const echoServer = net.createServer(function(connection) {
serverConnection = connection;
setTimeout(function() {
- // make sure both connections are still open
+ // Make sure both connections are still open
assert.strictEqual(serverConnection.readyState, 'open');
assert.strictEqual(clientConnection.readyState, 'open');
serverConnection.end();
diff --git a/test/parallel/test-net-socket-local-address.js b/test/parallel/test-net-socket-local-address.js
index e80731bc78..dda2d5acad 100644
--- a/test/parallel/test-net-socket-local-address.js
+++ b/test/parallel/test-net-socket-local-address.js
@@ -17,7 +17,7 @@ const server = net.createServer((socket) => {
});
server.on('close', common.mustCall(() => {
- // client and server should agree on the ports used
+ // Client and server should agree on the ports used
assert.deepStrictEqual(serverRemotePorts, clientLocalPorts);
assert.strictEqual(conns, 2);
}));
diff --git a/test/parallel/test-path-resolve.js b/test/parallel/test-path-resolve.js
index abbbf4dd5f..79c2d67920 100644
--- a/test/parallel/test-path-resolve.js
+++ b/test/parallel/test-path-resolve.js
@@ -11,7 +11,7 @@ const backslashRE = /\\/g;
const resolveTests = [
[ path.win32.resolve,
- // arguments result
+ // Arguments result
[[['c:/blah\\blah', 'd:/games', 'c:../a'], 'c:\\blah\\a'],
[['c:/ignore', 'd:\\a/b\\c/d', '\\e.exe'], 'd:\\e.exe'],
[['c:/ignore', 'c:/some/file'], 'c:\\some\\file'],
diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js
index 566a3eec54..e54fa385fe 100644
--- a/test/parallel/test-preload.js
+++ b/test/parallel/test-preload.js
@@ -43,7 +43,7 @@ childProcess.exec(
}
);
-// test that preloading a throwing module aborts
+// Test that preloading a throwing module aborts
childProcess.exec(
`"${nodeBinary}" ${preloadOption([fixtureA, fixtureThrows])} "${fixtureB}"`,
function(err, stdout, stderr) {
@@ -55,7 +55,7 @@ childProcess.exec(
}
);
-// test that preload can be used with --eval
+// Test that preload can be used with --eval
childProcess.exec(
`"${nodeBinary}" ${preloadOption([fixtureA])}-e "console.log('hello');"`,
function(err, stdout, stderr) {
@@ -64,7 +64,7 @@ childProcess.exec(
}
);
-// test that preload can be used with stdin
+// Test that preload can be used with stdin
const stdinProc = childProcess.spawn(
nodeBinary,
['--require', fixtureA],
@@ -132,7 +132,7 @@ childProcess.exec(
}
);
-// test that preloading with a relative path works
+// Test that preloading with a relative path works
process.chdir(fixtures.fixturesDir);
childProcess.exec(
`"${nodeBinary}" ${preloadOption(['./printA.js'])} "${fixtureB}"`,
diff --git a/test/parallel/test-priority-queue.js b/test/parallel/test-priority-queue.js
index f8526e6521..f6318ede7f 100644
--- a/test/parallel/test-priority-queue.js
+++ b/test/parallel/test-priority-queue.js
@@ -116,11 +116,11 @@ const PriorityQueue = require('internal/priority_queue');
queue.removeAt(5);
assert.strictEqual(largest.position, 5);
- // check that removing 2nd to last item works fine
+ // Check that removing 2nd to last item works fine
queue.removeAt(6);
assert.strictEqual(secondLargest.position, 6);
- // check that removing the last item doesn't throw
+ // Check that removing the last item doesn't throw
queue.removeAt(6);
assert.strictEqual(queue.shift().value, 1);
diff --git a/test/parallel/test-process-env-allowed-flags.js b/test/parallel/test-process-env-allowed-flags.js
index ad0e05f69b..9edc3504ef 100644
--- a/test/parallel/test-process-env-allowed-flags.js
+++ b/test/parallel/test-process-env-allowed-flags.js
@@ -48,7 +48,7 @@ require('../common');
});
}
-// assert all "canonical" flags begin with dash(es)
+// Assert all "canonical" flags begin with dash(es)
{
process.allowedNodeEnvironmentFlags.forEach((flag) => {
assert(/^--?[a-z0-9._-]+$/.test(flag),
diff --git a/test/parallel/test-process-external-stdio-close-spawn.js b/test/parallel/test-process-external-stdio-close-spawn.js
index 93d7f795bd..f7ee37c446 100644
--- a/test/parallel/test-process-external-stdio-close-spawn.js
+++ b/test/parallel/test-process-external-stdio-close-spawn.js
@@ -7,7 +7,7 @@ const cp = require('child_process');
if (process.argv[2] === 'child') {
process.on('message', common.mustCall((msg) => {
assert.strictEqual(msg, 'go');
- // the following console.log is an integral part
+ // The following console.log is an integral part
// of the test. If this regress, this call will
// cause the process to exit with 1
console.log('logging should not cause a crash');
diff --git a/test/parallel/test-process-external-stdio-close.js b/test/parallel/test-process-external-stdio-close.js
index 067a75ec93..9457161cf5 100644
--- a/test/parallel/test-process-external-stdio-close.js
+++ b/test/parallel/test-process-external-stdio-close.js
@@ -7,7 +7,7 @@ const cp = require('child_process');
if (process.argv[2] === 'child') {
process.on('message', common.mustCall((msg) => {
assert.strictEqual(msg, 'go');
- // the following console.log is an integral part
+ // The following console.log is an integral part
// of the test. If this regress, this call will
// cause the process to exit with 1
console.log('logging should not cause a crash');
diff --git a/test/parallel/test-process-really-exit.js b/test/parallel/test-process-really-exit.js
index c806d6c4aa..8445d220ca 100644
--- a/test/parallel/test-process-really-exit.js
+++ b/test/parallel/test-process-really-exit.js
@@ -2,7 +2,7 @@
require('../common');
const assert = require('assert');
-// ensure that the reallyExit hook is executed.
+// Ensure that the reallyExit hook is executed.
// see: https://github.com/nodejs/node/issues/25650
if (process.argv[2] === 'subprocess') {
process.reallyExit = function() {
diff --git a/test/parallel/test-process-umask.js b/test/parallel/test-process-umask.js
index 592463eca1..85af916207 100644
--- a/test/parallel/test-process-umask.js
+++ b/test/parallel/test-process-umask.js
@@ -44,7 +44,7 @@ const old = process.umask(mask);
assert.strictEqual(process.umask(old), parseInt(mask, 8));
-// confirm reading the umask does not modify it.
+// Confirm reading the umask does not modify it.
// 1. If the test fails, this call will succeed, but the mask will be set to 0
assert.strictEqual(process.umask(), old);
// 2. If the test fails, process.umask() will return 0
diff --git a/test/parallel/test-punycode.js b/test/parallel/test-punycode.js
index 9f7f772e17..d7ad2ec21f 100644
--- a/test/parallel/test-punycode.js
+++ b/test/parallel/test-punycode.js
@@ -245,15 +245,15 @@ tests.forEach((testCase) => {
// BMP code point
assert.strictEqual(punycode.ucs2.encode([0x61]), 'a');
-// supplementary code point (surrogate pair)
+// Supplementary code point (surrogate pair)
assert.strictEqual(punycode.ucs2.encode([0x1D306]), '\uD834\uDF06');
// high surrogate
assert.strictEqual(punycode.ucs2.encode([0xD800]), '\uD800');
-// high surrogate followed by non-surrogates
+// High surrogate followed by non-surrogates
assert.strictEqual(punycode.ucs2.encode([0xD800, 0x61, 0x62]), '\uD800ab');
// low surrogate
assert.strictEqual(punycode.ucs2.encode([0xDC00]), '\uDC00');
-// low surrogate followed by non-surrogates
+// Low surrogate followed by non-surrogates
assert.strictEqual(punycode.ucs2.encode([0xDC00, 0x61, 0x62]), '\uDC00ab');
assert.strictEqual(errors, 0);
diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js
index 72594ce719..175098aed7 100644
--- a/test/parallel/test-querystring.js
+++ b/test/parallel/test-querystring.js
@@ -34,7 +34,7 @@ function createWithNoPrototype(properties) {
});
return noProto;
}
-// folding block, commented to pass gjslint
+// Folding block, commented to pass gjslint
// {{{
// [ wonkyQS, canonicalQS, obj ]
const qsTestCases = [
@@ -204,12 +204,12 @@ function check(actual, expected, input) {
});
}
-// test that the canonical qs is parsed properly.
+// Test that the canonical qs is parsed properly.
qsTestCases.forEach((testCase) => {
check(qs.parse(testCase[0]), testCase[2], testCase[0]);
});
-// test that the colon test cases can do the same
+// Test that the colon test cases can do the same
qsColonTestCases.forEach((testCase) => {
check(qs.parse(testCase[0], ';', ':'), testCase[2], testCase[0]);
});
@@ -445,5 +445,5 @@ qsUnescapeTestCases.forEach((testCase) => {
createWithNoPrototype([{ key: 'f__', value: 'b_r' }]));
qs.unescape = prevUnescape;
}
-// test separator and "equals" parsing order
+// Test separator and "equals" parsing order
check(qs.parse('foo&bar', '&', '&'), { foo: '', bar: '' });
diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js
index 87547a9b6a..6cbd0b08ac 100644
--- a/test/parallel/test-readline-interface.js
+++ b/test/parallel/test-readline-interface.js
@@ -141,7 +141,7 @@ function isWarned(emitter) {
assert.ok(called);
}
- // sending a single character with no newline
+ // Sending a single character with no newline
{
const fi = new FakeInput();
const rli = new readline.Interface(fi, {});
@@ -399,7 +399,7 @@ function isWarned(emitter) {
});
}
- // duplicate lines are removed from history when
+ // Duplicate lines are removed from history when
// `options.removeHistoryDuplicates` is `true`
{
const fi = new FakeInput();
@@ -439,7 +439,7 @@ function isWarned(emitter) {
rli.close();
}
- // duplicate lines are not removed from history when
+ // Duplicate lines are not removed from history when
// `options.removeHistoryDuplicates` is `false`
{
const fi = new FakeInput();
@@ -921,7 +921,7 @@ function isWarned(emitter) {
assert.strictEqual(internalReadline.isFullWidthCodePoint('あ'), false);
});
- // wide characters should be treated as two columns.
+ // Wide characters should be treated as two columns.
assert.strictEqual(internalReadline.isFullWidthCodePoint('a'.charCodeAt(0)),
false);
assert.strictEqual(internalReadline.isFullWidthCodePoint('あ'.charCodeAt(0)),
diff --git a/test/parallel/test-readline-keys.js b/test/parallel/test-readline-keys.js
index b1c88e2ace..f61c64043f 100644
--- a/test/parallel/test-readline-keys.js
+++ b/test/parallel/test-readline-keys.js
@@ -259,7 +259,7 @@ addTest('\x1b[H\x1b[5H\x1b[1;5H', [
{ name: 'home', sequence: '\x1b[1;5H', code: '[H', ctrl: true },
]);
-// escape sequences broken into multiple data chunks
+// Escape sequences broken into multiple data chunks
addTest('\x1b[D\x1b[C\x1b[D\x1b[C'.split(''), [
{ name: 'left', sequence: '\x1b[D', code: '[D' },
{ name: 'right', sequence: '\x1b[C', code: '[C' },
@@ -267,7 +267,7 @@ addTest('\x1b[D\x1b[C\x1b[D\x1b[C'.split(''), [
{ name: 'right', sequence: '\x1b[C', code: '[C' },
]);
-// escape sequences mixed with regular ones
+// Escape sequences mixed with regular ones
addTest('\x1b[DD\x1b[2DD\x1b[2^D', [
{ name: 'left', sequence: '\x1b[D', code: '[D' },
{ name: 'd', sequence: 'D', shift: true },
@@ -318,5 +318,5 @@ const runKeyIntervalTests = [
])
].reverse().reduce((acc, fn) => fn(acc), () => {});
-// run key interval tests one after another
+// Run key interval tests one after another
runKeyIntervalTests();
diff --git a/test/parallel/test-readline-set-raw-mode.js b/test/parallel/test-readline-set-raw-mode.js
index db42a5a949..de47d14b03 100644
--- a/test/parallel/test-readline-set-raw-mode.js
+++ b/test/parallel/test-readline-set-raw-mode.js
@@ -42,7 +42,7 @@ stream.pause = function() {
pauseCalled = true;
};
-// when the "readline" starts in "terminal" mode,
+// When the "readline" starts in "terminal" mode,
// then setRawMode(true) should be called
const rli = readline.createInterface({
input: stream,
@@ -86,5 +86,5 @@ assert(!resumeCalled);
assert(pauseCalled);
assert.deepStrictEqual(stream.listeners('keypress'), []);
-// one data listener for the keypress events.
+// One data listener for the keypress events.
assert.strictEqual(stream.listeners('data').length, 1);
diff --git a/test/parallel/test-repl-context.js b/test/parallel/test-repl-context.js
index 0394129d45..378af1c144 100644
--- a/test/parallel/test-repl-context.js
+++ b/test/parallel/test-repl-context.js
@@ -51,7 +51,7 @@ const stream = new ArrayStream();
// use the server to create a new context
const context = server.createContext();
- // ensure that creating a new context does not
+ // Ensure that creating a new context does not
// have side effects on the server
assert.ok(server.underscoreAssigned);
assert.strictEqual(server.lines.length, 1);
@@ -63,7 +63,7 @@ const stream = new ArrayStream();
assert.ok(!server.underscoreAssigned);
assert.strictEqual(server.lines.length, 0);
- // ensure that assigning to '_' in the new context
+ // Ensure that assigning to '_' in the new context
// does not change the value in our server.
assert.ok(!server.underscoreAssigned);
vm.runInContext('_ = 1000;\n', context);
diff --git a/test/parallel/test-repl-end-emits-exit.js b/test/parallel/test-repl-end-emits-exit.js
index d01be957d3..8de0a006df 100644
--- a/test/parallel/test-repl-end-emits-exit.js
+++ b/test/parallel/test-repl-end-emits-exit.js
@@ -43,7 +43,7 @@ function testTerminalMode() {
});
r1.on('exit', function() {
- // should be fired from the simulated ^D keypress
+ // Should be fired from the simulated ^D keypress
terminalExit++;
testRegularMode();
});
@@ -61,7 +61,7 @@ function testRegularMode() {
});
r2.on('exit', function() {
- // should be fired from the simulated 'end' event
+ // Should be fired from the simulated 'end' event
regularExit++;
});
}
diff --git a/test/parallel/test-repl-save-load.js b/test/parallel/test-repl-save-load.js
index eff05a3920..2c42788be6 100644
--- a/test/parallel/test-repl-save-load.js
+++ b/test/parallel/test-repl-save-load.js
@@ -73,7 +73,7 @@ assert.strictEqual(fs.readFileSync(saveFileName, 'utf8'),
`${cmds.join('\n')}\n\n`);
}
-// make sure that the REPL data is "correct"
+// Make sure that the REPL data is "correct"
// so when I load it back I know I'm good
testMe.complete('inner.o', function(error, data) {
assert.deepStrictEqual(data, works);
@@ -85,7 +85,7 @@ putIn.run(['.clear']);
// Load the file back in
putIn.run([`.load ${saveFileName}`]);
-// make sure that the REPL data is "correct"
+// Make sure that the REPL data is "correct"
testMe.complete('inner.o', function(error, data) {
assert.deepStrictEqual(data, works);
});
diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js
index 5438c960b8..b28923a49b 100644
--- a/test/parallel/test-repl-tab-complete.js
+++ b/test/parallel/test-repl-tab-complete.js
@@ -145,7 +145,7 @@ testMe.complete('inner.o', common.mustCall(function(error, data) {
putIn.run(['.clear']);
-// def has the params and { on a separate line
+// The definition has the params and { on a separate line.
putIn.run([
'var top = function() {',
'r = function test (',
@@ -173,7 +173,7 @@ testMe.complete('inner.o', getNoResultsFunction());
putIn.run(['.clear']);
-// currently does not work, but should not break
+// Currently does not work, but should not break
putIn.run([
'var top = function() {',
'r = function test (',
@@ -187,7 +187,7 @@ testMe.complete('inner.o', getNoResultsFunction());
putIn.run(['.clear']);
-// make sure tab completion works on non-Objects
+// Make sure tab completion works on non-Objects
putIn.run([
'var str = "test";'
]);
@@ -197,7 +197,7 @@ testMe.complete('str.len', common.mustCall(function(error, data) {
putIn.run(['.clear']);
-// tab completion should not break on spaces
+// Tab completion should not break on spaces
const spaceTimeout = setTimeout(function() {
throw new Error('timeout');
}, 1000);
@@ -551,7 +551,7 @@ editor.completer('var log = console.l', common.mustCall((error, data) => {
}));
{
- // tab completion of lexically scoped variables
+ // Tab completion of lexically scoped variables
const stream = new ArrayStream();
const testRepl = repl.start({ stream });
diff --git a/test/parallel/test-repl-tab.js b/test/parallel/test-repl-tab.js
index 0ebc949077..f64a00d8bc 100644
--- a/test/parallel/test-repl-tab.js
+++ b/test/parallel/test-repl-tab.js
@@ -4,7 +4,7 @@ const assert = require('assert');
const repl = require('repl');
const zlib = require('zlib');
-// just use builtin stream inherited from Duplex
+// Just use builtin stream inherited from Duplex
const putIn = zlib.createGzip();
const testMe = repl.start('', putIn, function(cmd, context, filename,
callback) {
diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js
index bcaa39f6aa..2337e32280 100644
--- a/test/parallel/test-repl.js
+++ b/test/parallel/test-repl.js
@@ -48,7 +48,7 @@ async function runReplTests(socket, prompt, tests) {
let lineBuffer = '';
for (const { send, expect } of tests) {
- // expect can be a single line or multiple lines
+ // Expect can be a single line or multiple lines
const expectedLines = Array.isArray(expect) ? expect : [ expect ];
console.error('out:', JSON.stringify(send));
@@ -448,7 +448,7 @@ const errorTests = [
/'thefourtheye'/
]
},
- // empty lines in the REPL should be allowed
+ // Empty lines in the REPL should be allowed
{
send: '\n\r\n\r\n',
expect: ''
diff --git a/test/parallel/test-require-long-path.js b/test/parallel/test-require-long-path.js
index 548a0b5425..c39d8f2a41 100644
--- a/test/parallel/test-require-long-path.js
+++ b/test/parallel/test-require-long-path.js
@@ -8,7 +8,7 @@ const path = require('path');
const tmpdir = require('../common/tmpdir');
-// make a path that is more than 260 chars long.
+// Make a path that is more than 260 chars long.
const dirNameLen = Math.max(260 - tmpdir.path.length, 1);
const dirName = path.join(tmpdir.path, 'x'.repeat(dirNameLen));
const fullDirPath = path.resolve(dirName);
diff --git a/test/parallel/test-stream-duplex-destroy.js b/test/parallel/test-stream-duplex-destroy.js
index 1108413e72..3c38d2c364 100644
--- a/test/parallel/test-stream-duplex-destroy.js
+++ b/test/parallel/test-stream-duplex-destroy.js
@@ -76,7 +76,7 @@ const assert = require('assert');
duplex.on('end', common.mustNotCall('no end event'));
duplex.on('finish', common.mustNotCall('no finish event'));
- // error is swallowed by the custom _destroy
+ // Error is swallowed by the custom _destroy
duplex.on('error', common.mustNotCall('no error event'));
duplex.on('close', common.mustCall());
diff --git a/test/parallel/test-stream-ispaused.js b/test/parallel/test-stream-ispaused.js
index f45c0209cc..366d34e326 100644
--- a/test/parallel/test-stream-ispaused.js
+++ b/test/parallel/test-stream-ispaused.js
@@ -29,7 +29,7 @@ const readable = new stream.Readable();
// _read is a noop, here.
readable._read = Function();
-// default state of a stream is not "paused"
+// Default state of a stream is not "paused"
assert.ok(!readable.isPaused());
// make the stream start flowing...
diff --git a/test/parallel/test-stream-pipe-unpipe-streams.js b/test/parallel/test-stream-pipe-unpipe-streams.js
index 49e02bea9c..c8a383bc61 100644
--- a/test/parallel/test-stream-pipe-unpipe-streams.js
+++ b/test/parallel/test-stream-pipe-unpipe-streams.js
@@ -33,7 +33,7 @@ source.unpipe(dest1);
assert.strictEqual(source._readableState.pipes, null);
{
- // test `cleanup()` if we unpipe all streams.
+ // Test `cleanup()` if we unpipe all streams.
const source = Readable({ read: () => {} });
const dest1 = Writable({ write: () => {} });
const dest2 = Writable({ write: () => {} });
diff --git a/test/parallel/test-stream-pipeline.js b/test/parallel/test-stream-pipeline.js
index 34928794cd..ef5a39fddd 100644
--- a/test/parallel/test-stream-pipeline.js
+++ b/test/parallel/test-stream-pipeline.js
@@ -172,7 +172,7 @@ const { promisify } = require('util');
rs.push('hello');
},
destroy: common.mustCall((err, cb) => {
- // prevents fd leaks by destroying http pipelines
+ // Prevents fd leaks by destroying http pipelines
cb();
})
});
diff --git a/test/parallel/test-stream-readable-destroy.js b/test/parallel/test-stream-readable-destroy.js
index 8ad375e68b..9f56467e20 100644
--- a/test/parallel/test-stream-readable-destroy.js
+++ b/test/parallel/test-stream-readable-destroy.js
@@ -69,7 +69,7 @@ const assert = require('assert');
read.on('end', common.mustNotCall('no end event'));
- // error is swallowed by the custom _destroy
+ // Error is swallowed by the custom _destroy
read.on('error', common.mustNotCall('no error event'));
read.on('close', common.mustCall());
diff --git a/test/parallel/test-stream-readable-event.js b/test/parallel/test-stream-readable-event.js
index 73ca80400a..8276e7ce4d 100644
--- a/test/parallel/test-stream-readable-event.js
+++ b/test/parallel/test-stream-readable-event.js
@@ -58,7 +58,7 @@ const Readable = require('stream').Readable;
r.push(Buffer.from('bl'));
setTimeout(function() {
- // assert we're testing what we think we are
+ // Assert we're testing what we think we are
assert(r._readableState.reading);
r.on('readable', common.mustCall());
}, 1);
@@ -78,14 +78,14 @@ const Readable = require('stream').Readable;
r.push(null);
setTimeout(function() {
- // assert we're testing what we think we are
+ // Assert we're testing what we think we are
assert(!r._readableState.reading);
r.on('readable', common.mustCall());
}, 1);
}
{
- // pushing a empty string in non-objectMode should
+ // Pushing an empty string in non-objectMode should
// trigger next `read()`.
const underlyingData = ['', 'x', 'y', '', 'z'];
const expected = underlyingData.filter((data) => data);
diff --git a/test/parallel/test-stream-readable-flow-recursion.js b/test/parallel/test-stream-readable-flow-recursion.js
index 6cc1ce65b1..fed4287445 100644
--- a/test/parallel/test-stream-readable-flow-recursion.js
+++ b/test/parallel/test-stream-readable-flow-recursion.js
@@ -30,7 +30,7 @@ const assert = require('assert');
const Readable = require('stream').Readable;
-// throw an error if we trigger a nextTick warning.
+// Throw an error if we trigger a nextTick warning.
process.throwDeprecation = true;
const stream = new Readable({ highWaterMark: 2 });
diff --git a/test/parallel/test-stream-readable-reading-readingMore.js b/test/parallel/test-stream-readable-reading-readingMore.js
index 5ea91dfa8b..2198a889f0 100644
--- a/test/parallel/test-stream-readable-reading-readingMore.js
+++ b/test/parallel/test-stream-readable-reading-readingMore.js
@@ -37,7 +37,7 @@ const Readable = require('stream').Readable;
// after which everything is governed by the .read() call
assert.strictEqual(state.readingMore, expectedReadingMore.shift());
- // if the stream has ended, we shouldn't be reading
+ // If the stream has ended, we shouldn't be reading
assert.strictEqual(state.ended, !state.reading);
const data = readable.read();
diff --git a/test/parallel/test-stream-transform-destroy.js b/test/parallel/test-stream-transform-destroy.js
index 47cce87264..c594d9989a 100644
--- a/test/parallel/test-stream-transform-destroy.js
+++ b/test/parallel/test-stream-transform-destroy.js
@@ -72,7 +72,7 @@ const assert = require('assert');
transform.on('close', common.mustCall());
transform.on('finish', common.mustNotCall('no finish event'));
- // error is swallowed by the custom _destroy
+ // Error is swallowed by the custom _destroy
transform.on('error', common.mustNotCall('no error event'));
transform.destroy(expected);
diff --git a/test/parallel/test-stream-transform-split-highwatermark.js b/test/parallel/test-stream-transform-split-highwatermark.js
index f931d4f6ce..301d81bc90 100644
--- a/test/parallel/test-stream-transform-split-highwatermark.js
+++ b/test/parallel/test-stream-transform-split-highwatermark.js
@@ -81,7 +81,7 @@ testTransform(0, 0, {
});
}
-// test non Duplex streams ignore the options
+// Test non Duplex streams ignore the options
{
const r = new Readable({ readableHighWaterMark: 666 });
assert.strictEqual(r._readableState.highWaterMark, DEFAULT);
diff --git a/test/parallel/test-stream-writable-destroy.js b/test/parallel/test-stream-writable-destroy.js
index 5fbb7ae19b..867571ef37 100644
--- a/test/parallel/test-stream-writable-destroy.js
+++ b/test/parallel/test-stream-writable-destroy.js
@@ -69,7 +69,7 @@ const assert = require('assert');
write.on('finish', common.mustNotCall('no finish event'));
write.on('close', common.mustCall());
- // error is swallowed by the custom _destroy
+ // Error is swallowed by the custom _destroy
write.on('error', common.mustNotCall('no error event'));
write.destroy(expected);
diff --git a/test/parallel/test-stream-writev.js b/test/parallel/test-stream-writev.js
index 7283aa493e..1123e66ddc 100644
--- a/test/parallel/test-stream-writev.js
+++ b/test/parallel/test-stream-writev.js
@@ -113,7 +113,7 @@ function test(decode, uncork, multi, next) {
w.end(cnt('end'));
w.on('finish', function() {
- // make sure finish comes after all the write cb
+ // Make sure finish comes after all the write cb
cnt('finish')();
assert.deepStrictEqual(actualChunks, expectChunks);
next();
diff --git a/test/parallel/test-stream2-transform.js b/test/parallel/test-stream2-transform.js
index a1bad84a8f..92e4669dd4 100644
--- a/test/parallel/test-stream2-transform.js
+++ b/test/parallel/test-stream2-transform.js
@@ -423,7 +423,7 @@ const Transform = require('_stream_transform');
});
jp.end();
- // read one more time to get the 'end' event
+ // Read one more time to get the 'end' event
jp.read();
process.nextTick(common.mustCall(function() {
@@ -464,7 +464,7 @@ const Transform = require('_stream_transform');
});
js.end();
- // read one more time to get the 'end' event
+ // Read one more time to get the 'end' event
js.read();
process.nextTick(common.mustCall(function() {
diff --git a/test/parallel/test-stream2-unpipe-drain.js b/test/parallel/test-stream2-unpipe-drain.js
index ac2a3a5b06..4c283df680 100644
--- a/test/parallel/test-stream2-unpipe-drain.js
+++ b/test/parallel/test-stream2-unpipe-drain.js
@@ -28,7 +28,7 @@ const stream = require('stream');
class TestWriter extends stream.Writable {
_write(buffer, encoding, callback) {
console.log('write called');
- // super slow write stream (callback never called)
+ // Super slow write stream (callback never called)
}
}
diff --git a/test/parallel/test-stream3-cork-end.js b/test/parallel/test-stream3-cork-end.js
index e046d46368..8403e20fb1 100644
--- a/test/parallel/test-stream3-cork-end.js
+++ b/test/parallel/test-stream3-cork-end.js
@@ -21,7 +21,7 @@ const w = new Writable();
w._write = function(chunk, encoding, cb) {
// Stream end event is not seen before the last write
assert.ok(!seenEnd);
- // default encoding given none was specified
+ // Default encoding given none was specified
assert.strictEqual(encoding, 'buffer');
seenChunks.push(chunk);
@@ -70,7 +70,7 @@ writeChunks(inputChunks, () => {
// stream should not ended in current tick
assert.ok(!seenEnd);
- // buffered bytes should be seen in current tick
+ // Buffered bytes should be seen in current tick
assert.strictEqual(seenChunks.length, 4);
// did the chunks match
diff --git a/test/parallel/test-stream3-cork-uncork.js b/test/parallel/test-stream3-cork-uncork.js
index 91d27c916c..5b52ec0019 100644
--- a/test/parallel/test-stream3-cork-uncork.js
+++ b/test/parallel/test-stream3-cork-uncork.js
@@ -19,7 +19,7 @@ let seenEnd = false;
const w = new Writable();
// lets arrange to store the chunks
w._write = function(chunk, encoding, cb) {
- // default encoding given none was specified
+ // Default encoding given none was specified
assert.strictEqual(encoding, 'buffer');
seenChunks.push(chunk);
@@ -65,7 +65,7 @@ writeChunks(inputChunks, () => {
// trigger writing out the buffer
w.uncork();
- // buffered bytes should be seen in current tick
+ // Buffered bytes should be seen in current tick
assert.strictEqual(seenChunks.length, 4);
// did the chunks match
diff --git a/test/parallel/test-string-decoder-end.js b/test/parallel/test-string-decoder-end.js
index 3dd445e6c7..b10756a463 100644
--- a/test/parallel/test-string-decoder-end.js
+++ b/test/parallel/test-string-decoder-end.js
@@ -31,7 +31,7 @@ const encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2'];
const bufs = [ '☃💩', 'asdf' ].map((b) => Buffer.from(b));
-// also test just arbitrary bytes from 0-15.
+// Also test just arbitrary bytes from 0-15.
for (let i = 1; i <= 16; i++) {
const bytes = '.'.repeat(i - 1).split('.').map((_, j) => j + 0x78);
bufs.push(Buffer.from(bytes));
diff --git a/test/parallel/test-stringbytes-external.js b/test/parallel/test-stringbytes-external.js
index f05b40a3ef..9d8aa45f67 100644
--- a/test/parallel/test-stringbytes-external.js
+++ b/test/parallel/test-stringbytes-external.js
@@ -48,9 +48,9 @@ const size = 1 << 20;
write_str = write_str.repeat(size);
ucs2_control = ucs2_control.repeat(size);
-// check resultant buffer and output string
+// Check resultant buffer and output string
b = Buffer.from(write_str, 'ucs2');
-// check fist Buffer created from write string
+// Check fist Buffer created from write string
for (let i = 0; i < b.length; i += 2) {
assert.strictEqual(b[i], 0x61);
assert.strictEqual(b[i + 1], 0);
@@ -59,11 +59,11 @@ for (let i = 0; i < b.length; i += 2) {
// Create another string to create an external string
const b_ucs = b.toString('ucs2');
-// check control against external binary string
+// Check control against external binary string
const l_bin = b.toString('latin1');
assert.strictEqual(ucs2_control, l_bin);
-// check control against external binary string
+// Check control against external binary string
const b_bin = b.toString('binary');
assert.strictEqual(ucs2_control, b_bin);
@@ -72,7 +72,7 @@ const c_bin = Buffer.from(l_bin, 'latin1');
const c_ucs = Buffer.from(b_ucs, 'ucs2');
// make sure they're the same length
assert.strictEqual(c_bin.length, c_ucs.length);
-// make sure Buffers from externals are the same
+// Make sure Buffers from externals are the same
for (let i = 0; i < c_bin.length; i++) {
assert.strictEqual(c_bin[i], c_ucs[i]);
}
@@ -82,7 +82,7 @@ assert.strictEqual(c_bin.toString('latin1'), ucs2_control);
assert.strictEqual(c_ucs.toString('latin1'), ucs2_control);
-// now let's test BASE64 and HEX encoding/decoding
+// Now let's test BASE64 and HEX encoding/decoding
const RADIOS = 2;
const PRE_HALF_APEX = Math.ceil(EXTERN_APEX / 2) - RADIOS;
const PRE_3OF4_APEX = Math.ceil((EXTERN_APEX / 4) * 3) - RADIOS;
diff --git a/test/parallel/test-tls-getcipher.js b/test/parallel/test-tls-getcipher.js
index 3ba33faf42..37677ada7f 100644
--- a/test/parallel/test-tls-getcipher.js
+++ b/test/parallel/test-tls-getcipher.js
@@ -27,7 +27,7 @@ if (!common.hasCrypto)
const assert = require('assert');
const tls = require('tls');
-// import fixtures directly from its module
+// Import fixtures directly from its module
const fixtures = require('../common/fixtures');
const cipher_list = ['AES128-SHA256', 'AES256-SHA256'];
diff --git a/test/parallel/test-trace-events-api.js b/test/parallel/test-trace-events-api.js
index cf11daa6ed..1953e2add9 100644
--- a/test/parallel/test-trace-events-api.js
+++ b/test/parallel/test-trace-events-api.js
@@ -56,7 +56,7 @@ assert.strictEqual(tracing.enabled, false);
assert.strictEqual(getEnabledCategories(), enabledCategories);
tracing.enable();
-tracing.enable(); // purposefully enable twice to test calling twice
+tracing.enable(); // Purposefully enable twice to test calling twice
assert.strictEqual(tracing.enabled, true);
assert.strictEqual(getEnabledCategories(),
@@ -72,7 +72,7 @@ tracing2.enable();
assert.strictEqual(getEnabledCategories(), 'foo');
tracing2.disable();
-tracing2.disable(); // purposefully disable twice to test calling twice
+tracing2.disable(); // Purposefully disable twice to test calling twice
assert.strictEqual(getEnabledCategories(), enabledCategories);
if (isChild) {
diff --git a/test/parallel/test-trace-events-category-used.js b/test/parallel/test-trace-events-category-used.js
index f4b839dddc..3d584b1f2a 100644
--- a/test/parallel/test-trace-events-category-used.js
+++ b/test/parallel/test-trace-events-category-used.js
@@ -17,7 +17,7 @@ tmpdir.refresh();
const procEnabled = cp.spawn(
process.execPath,
[ '--trace-event-categories', 'custom',
- // make test less noisy since internal/test/binding
+ // Make test less noisy since internal/test/binding
// emits a warning.
'--no-warnings',
'--expose-internals',
@@ -35,7 +35,7 @@ procEnabled.once('close', common.mustCall(() => {
const procDisabled = cp.spawn(
process.execPath,
[ '--trace-event-categories', 'other',
- // make test less noisy since internal/test/binding
+ // Make test less noisy since internal/test/binding
// emits a warning.
'--no-warnings',
'--expose-internals',
diff --git a/test/parallel/test-url-parse-format.js b/test/parallel/test-url-parse-format.js
index cbe8eea257..b318658feb 100644
--- a/test/parallel/test-url-parse-format.js
+++ b/test/parallel/test-url-parse-format.js
@@ -180,7 +180,7 @@ const parseTests = {
path: '/b/c'
},
- // an unexpected invalid char in the hostname.
+ // An unexpected invalid char in the hostname.
'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 5be68bf4b7..926d28f14e 100644
--- a/test/parallel/test-v8-coverage.js
+++ b/test/parallel/test-v8-coverage.js
@@ -113,7 +113,7 @@ function nextdir() {
assert.strictEqual(fixtureCoverage, undefined);
}
-// disables async hooks before writing coverage.
+// Disables async hooks before writing coverage.
{
const coverageDirectory = path.join(tmpdir.path, nextdir());
const output = spawnSync(process.execPath, [
diff --git a/test/parallel/test-vm-global-property-interceptors.js b/test/parallel/test-vm-global-property-interceptors.js
index 8571fbe19f..8fe5f8f3da 100644
--- a/test/parallel/test-vm-global-property-interceptors.js
+++ b/test/parallel/test-vm-global-property-interceptors.js
@@ -108,7 +108,7 @@ vm.runInContext('k = 2;', ctx);
assert.strictEqual(ctx.k, 2);
assert.strictEqual(vm.runInContext('k;', ctx), 2);
-// redefine properties on the global object
+// Redefine properties on the global object
assert.strictEqual(typeof vm.runInContext('encodeURI;', ctx), 'function');
assert.strictEqual(ctx.encodeURI, undefined);
vm.runInContext(`
diff --git a/test/parallel/test-windows-failed-heap-allocation.js b/test/parallel/test-windows-failed-heap-allocation.js
index e03c9ee006..ff8062855d 100644
--- a/test/parallel/test-windows-failed-heap-allocation.js
+++ b/test/parallel/test-windows-failed-heap-allocation.js
@@ -9,7 +9,7 @@ const assert = require('assert');
const { exec } = require('child_process');
if (process.argv[2] === 'heapBomb') {
- // heap bomb, imitates a memory leak quickly
+ // Heap bomb, imitates a memory leak quickly
const fn = (nM) => [...Array(nM)].map((i) => fn(nM * 2));
fn(2);
}
diff --git a/test/parallel/test-zlib-deflate-raw-inherits.js b/test/parallel/test-zlib-deflate-raw-inherits.js
index bb53caa9b5..34bf31058a 100644
--- a/test/parallel/test-zlib-deflate-raw-inherits.js
+++ b/test/parallel/test-zlib-deflate-raw-inherits.js
@@ -4,7 +4,7 @@ require('../common');
const { DeflateRaw } = require('zlib');
const { Readable } = require('stream');
-// validates that zlib.DeflateRaw can be inherited
+// Validates that zlib.DeflateRaw can be inherited
// with Object.setPrototypeOf
function NotInitialized(options) {
diff --git a/test/parallel/test-zlib-destroy.js b/test/parallel/test-zlib-destroy.js
index d8eab42186..bbfce22ee2 100644
--- a/test/parallel/test-zlib-destroy.js
+++ b/test/parallel/test-zlib-destroy.js
@@ -5,7 +5,7 @@ require('../common');
const assert = require('assert');
const zlib = require('zlib');
-// verify that the zlib transform does clean up
+// Verify that the zlib transform does clean up
// the handle when calling destroy.
const ts = zlib.createGzip();
diff --git a/test/parallel/test-zlib-dictionary.js b/test/parallel/test-zlib-dictionary.js
index b7f6a13855..11c8959cc6 100644
--- a/test/parallel/test-zlib-dictionary.js
+++ b/test/parallel/test-zlib-dictionary.js
@@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
-// test compression/decompression with dictionary
+// Test compression/decompression with dictionary
const common = require('../common');
const assert = require('assert');
diff --git a/test/parallel/test-zlib.js b/test/parallel/test-zlib.js
index 6104172c7a..d5ef9fe9d1 100644
--- a/test/parallel/test-zlib.js
+++ b/test/parallel/test-zlib.js
@@ -36,7 +36,7 @@ let zlibPairs = [
[zlib.BrotliCompress, zlib.BrotliDecompress],
];
-// how fast to trickle through the slowstream
+// How fast to trickle through the slowstream
let trickle = [128, 1024, 1024 * 1024];
// tunable options for zlib classes.