diff options
Diffstat (limited to 'test')
108 files changed, 155 insertions, 155 deletions
diff --git a/test/abort/test-abort-backtrace.js b/test/abort/test-abort-backtrace.js index 7f87ef0e7f..b609ec7e4e 100644 --- a/test/abort/test-abort-backtrace.js +++ b/test/abort/test-abort-backtrace.js @@ -10,7 +10,7 @@ if (process.argv[2] === 'child') { const stderr = child.stderr.toString(); assert.strictEqual(child.stdout.toString(), ''); - // stderr will be empty for systems that don't support backtraces. + // Stderr will be empty for systems that don't support backtraces. if (stderr !== '') { const frames = stderr.trimRight().split('\n').map((s) => s.trim()); diff --git a/test/async-hooks/test-async-await.js b/test/async-hooks/test-async-await.js index 0103f63621..8aee59a36f 100644 --- a/test/async-hooks/test-async-await.js +++ b/test/async-hooks/test-async-await.js @@ -14,7 +14,7 @@ const util = require('util'); const sleep = util.promisify(setTimeout); // either 'inited' or 'resolved' const promisesInitState = new Map(); -// either 'before' or 'after' AND asyncId must be present in the other map +// Either 'before' or 'after' AND asyncId must be present in the other map const promisesExecutionState = new Map(); const hooks = initHooks({ diff --git a/test/async-hooks/test-embedder.api.async-resource.after-on-destroyed.js b/test/async-hooks/test-embedder.api.async-resource.after-on-destroyed.js index 3cf0cc430f..a389eddf42 100644 --- a/test/async-hooks/test-embedder.api.async-resource.after-on-destroyed.js +++ b/test/async-hooks/test-embedder.api.async-resource.after-on-destroyed.js @@ -14,7 +14,7 @@ if (process.argv[2] === 'child') { const hooks = initHooks(); hooks.enable(); - // once 'destroy' has been emitted, we can no longer emit 'after' + // Once 'destroy' has been emitted, we can no longer emit 'after' // Emitting 'before', 'after' and then 'destroy' const event1 = new AsyncResource('event1', async_hooks.executionAsyncId()); diff --git a/test/async-hooks/test-embedder.api.async-resource.before-on-destroyed.js b/test/async-hooks/test-embedder.api.async-resource.before-on-destroyed.js index 6463c438ed..d6465a8445 100644 --- a/test/async-hooks/test-embedder.api.async-resource.before-on-destroyed.js +++ b/test/async-hooks/test-embedder.api.async-resource.before-on-destroyed.js @@ -14,7 +14,7 @@ if (process.argv[2] === 'child') { const hooks = initHooks(); hooks.enable(); - // once 'destroy' has been emitted, we can no longer emit 'before' + // Once 'destroy' has been emitted, we can no longer emit 'before' // Emitting 'before', 'after' and then 'destroy' const event1 = new AsyncResource('event1', async_hooks.executionAsyncId()); diff --git a/test/async-hooks/test-embedder.api.async-resource.improper-order.js b/test/async-hooks/test-embedder.api.async-resource.improper-order.js index 048ae08413..4a38d87ce2 100644 --- a/test/async-hooks/test-embedder.api.async-resource.improper-order.js +++ b/test/async-hooks/test-embedder.api.async-resource.improper-order.js @@ -14,7 +14,7 @@ if (process.argv[2] === 'child') { const hooks = initHooks(); hooks.enable(); - // async hooks enforce proper order of 'before' and 'after' invocations + // Async hooks enforce proper order of 'before' and 'after' invocations // Proper ordering const event1 = new AsyncResource('event1', async_hooks.executionAsyncId()); diff --git a/test/async-hooks/test-embedder.api.async-resource.js b/test/async-hooks/test-embedder.api.async-resource.js index 6f71a3e98c..74d6c478c8 100644 --- a/test/async-hooks/test-embedder.api.async-resource.js +++ b/test/async-hooks/test-embedder.api.async-resource.js @@ -29,13 +29,13 @@ assert.strictEqual( async_hooks.executionAsyncId() ); -// create first custom event 'alcazares' with triggerAsyncId derived +// Create first custom event 'alcazares' with triggerAsyncId derived // from async_hooks executionAsyncId const alcaTriggerId = async_hooks.executionAsyncId(); const alcaEvent = new AsyncResource('alcazares', alcaTriggerId); const alcazaresActivities = hooks.activitiesOfTypes([ 'alcazares' ]); -// alcazares event was constructed and thus only has an `init` call +// Alcazares event was constructed and thus only has an `init` call assert.strictEqual(alcazaresActivities.length, 1); const alcazares = alcazaresActivities[0]; assert.strictEqual(alcazares.type, 'alcazares'); @@ -83,7 +83,7 @@ function tick1() { checkInvocations(poblado, { init: 1, before: 1, after: 1 }, 'poblado emitted after'); - // after we disable the hooks we shouldn't receive any events anymore + // After we disable the hooks we shouldn't receive any events anymore hooks.disable(); alcaEvent.emitDestroy(); tick(1, common.mustCall(tick2)); diff --git a/test/async-hooks/test-enable-disable.js b/test/async-hooks/test-enable-disable.js index c14a125688..f71fd63e1c 100644 --- a/test/async-hooks/test-enable-disable.js +++ b/test/async-hooks/test-enable-disable.js @@ -261,7 +261,7 @@ function onexit() { 'hook2Second: when process exits'); checkInvocations(hook3First, { init: 1, before: 1, after: 1, destroy: 1 }, 'hook3First: when process exits'); - // we don't see a "destroy" invocation here since hook3 disabled itself + // We don't see a "destroy" invocation here since hook3 disabled itself // during its "after" invocation checkInvocations(hook3Second, { init: 1, before: 1, after: 1 }, 'hook3Second: when process exits'); diff --git a/test/async-hooks/test-fsreqcallback-readFile.js b/test/async-hooks/test-fsreqcallback-readFile.js index 3ae31378cd..01ccce9b4c 100644 --- a/test/async-hooks/test-fsreqcallback-readFile.js +++ b/test/async-hooks/test-fsreqcallback-readFile.js @@ -32,7 +32,7 @@ function onread() { checkInvocations(as[2], { init: 1, before: 1, after: 1, destroy: 1 }, 'reqwrap[2]: while in onread callback'); - // this callback is called from within the last fs req callback therefore + // This callback is called from within the last fs req callback therefore // the last req is still going and after/destroy haven't been called yet checkInvocations(as[3], { init: 1, before: 1 }, 'reqwrap[3]: while in onread callback'); diff --git a/test/async-hooks/test-pipeconnectwrap.js b/test/async-hooks/test-pipeconnectwrap.js index 6c68186e2f..5d3706ac44 100644 --- a/test/async-hooks/test-pipeconnectwrap.js +++ b/test/async-hooks/test-pipeconnectwrap.js @@ -53,7 +53,7 @@ function onlisten() { const awaitOnconnectCalls = new Set(['server', 'client']); function maybeOnconnect(source) { - // both server and client must call onconnect. On most OS's waiting for + // Both server and client must call onconnect. On most OS's waiting for // the client is sufficient, but on CentOS 5 the sever needs to respond too. assert.ok(awaitOnconnectCalls.size > 0); awaitOnconnectCalls.delete(source); diff --git a/test/async-hooks/test-pipewrap.js b/test/async-hooks/test-pipewrap.js index a632115d22..0a4d082856 100644 --- a/test/async-hooks/test-pipewrap.js +++ b/test/async-hooks/test-pipewrap.js @@ -22,7 +22,7 @@ nodeVersionSpawn .on('exit', common.mustCall(onsleepExit)) .on('close', common.mustCall(onsleepClose)); -// a process wrap and 3 pipe wraps for std{in,out,err} are initialized +// A process wrap and 3 pipe wraps for std{in,out,err} are initialized // synchronously const processes = hooks.activitiesOfTypes('PROCESSWRAP'); const pipes = hooks.activitiesOfTypes('PIPEWRAP'); diff --git a/test/async-hooks/test-promise.promise-before-init-hooks.js b/test/async-hooks/test-promise.promise-before-init-hooks.js index f9ba24c044..0f74c968e6 100644 --- a/test/async-hooks/test-promise.promise-before-init-hooks.js +++ b/test/async-hooks/test-promise.promise-before-init-hooks.js @@ -32,7 +32,7 @@ process.on('exit', function onexit() { const a0 = as[0]; assert.strictEqual(a0.type, 'PROMISE'); assert.strictEqual(typeof a0.uid, 'number'); - // we can't get the asyncId from the parent dynamically, since init was + // We can't get the asyncId from the parent dynamically, since init was // never called. However, it is known that the parent promise was created // immediately before the child promise, thus there should only be one // difference in id. diff --git a/test/async-hooks/test-signalwrap.js b/test/async-hooks/test-signalwrap.js index c94d763450..5bc02e6dc4 100644 --- a/test/async-hooks/test-signalwrap.js +++ b/test/async-hooks/test-signalwrap.js @@ -92,7 +92,7 @@ function onexit() { checkInvocations( signal1, { init: 1, before: 2, after: 2, destroy: 1 }, 'signal1: when second SIGUSR2 process exits'); - // second signal not destroyed yet since its event listener is still active + // Second signal not destroyed yet since its event listener is still active checkInvocations( signal2, { init: 1, before: 1, after: 1 }, 'signal2: when second SIGUSR2 process exits'); diff --git a/test/common/index.js b/test/common/index.js index 7b668e58c4..33089e69af 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -336,7 +336,7 @@ function _mustCallInner(fn, criteria = 1, field) { name: fn.name || '<anonymous>' }; - // add the exit listener only once to avoid listener leak warnings + // Add the exit listener only once to avoid listener leak warnings if (mustCallChecks.length === 0) process.on('exit', runCallChecks); mustCallChecks.push(context); @@ -392,7 +392,7 @@ function getCallSite(top) { `${stack[0].getFileName()}:${stack[0].getLineNumber()}`; const err = new Error(); Error.captureStackTrace(err, top); - // with the V8 Error API, the stack is not formatted until it is accessed + // With the V8 Error API, the stack is not formatted until it is accessed err.stack; Error.prepareStackTrace = originalStackFormatter; return err.stack; @@ -507,7 +507,7 @@ function expectWarningByMap(warningMap) { process.on('warning', (warning) => catchWarning[warning.name](warning)); } -// accepts a warning name and description or array of descriptions or a map +// Accepts a warning name and description or array of descriptions or a map // of warning names to description(s) // ensures a warning is generated for each name/description pair function expectWarning(nameOrMap, expected, code) { diff --git a/test/es-module/test-esm-preserve-symlinks-main.js b/test/es-module/test-esm-preserve-symlinks-main.js index fbca5dce74..808b6c9a15 100644 --- a/test/es-module/test-esm-preserve-symlinks-main.js +++ b/test/es-module/test-esm-preserve-symlinks-main.js @@ -35,7 +35,7 @@ try { } function doTest(flags, done) { - // invoke the main file via a symlink. In this case --preserve-symlinks-main + // Invoke the main file via a symlink. In this case --preserve-symlinks-main // dictates that it'll resolve relative imports in the main file relative to // the symlink, and not relative to the symlink target; the file structure set // up above requires this to not crash when loading ./submodule_link.js diff --git a/test/js-native-api/test_general/test.js b/test/js-native-api/test_general/test.js index a8548bcdf9..7a65297cd3 100644 --- a/test/js-native-api/test_general/test.js +++ b/test/js-native-api/test_general/test.js @@ -48,7 +48,7 @@ assert.strictEqual(test_general.testGetVersion(), 3); assert.strictEqual(test_general.testNapiTypeof(val), typeof val); }); -// since typeof in js return object need to validate specific case +// Since typeof in js return object need to validate specific case // for null assert.strictEqual(test_general.testNapiTypeof(null), 'null'); diff --git a/test/js-native-api/test_number/test.js b/test/js-native-api/test_number/test.js index 34f48aee57..a7a6009852 100644 --- a/test/js-native-api/test_number/test.js +++ b/test/js-native-api/test_number/test.js @@ -49,7 +49,7 @@ testUint32(4294967296, 0); testUint32(4294967297, 1); testUint32(17 * 4294967296 + 1, 1); -// validate documented behavior when value is retrieved as 32-bit integer with +// Validate documented behavior when value is retrieved as 32-bit integer with // `napi_get_value_int32` function testInt32(input, expected = input) { assert.strictEqual(expected, test_number.TestInt32Truncation(input)); @@ -92,7 +92,7 @@ testInt32(Number.POSITIVE_INFINITY, 0); testInt32(Number.NEGATIVE_INFINITY, 0); testInt32(Number.NaN, 0); -// validate documented behavior when value is retrieved as 64-bit integer with +// Validate documented behavior when value is retrieved as 64-bit integer with // `napi_get_value_int64` function testInt64(input, expected = input) { assert.strictEqual(expected, test_number.TestInt64Truncation(input)); diff --git a/test/known_issues/test-dgram-bind-shared-ports-after-port-0.js b/test/known_issues/test-dgram-bind-shared-ports-after-port-0.js index 7b750c765b..fbf88d4165 100644 --- a/test/known_issues/test-dgram-bind-shared-ports-after-port-0.js +++ b/test/known_issues/test-dgram-bind-shared-ports-after-port-0.js @@ -45,7 +45,7 @@ if (cluster.isMaster) { // worker code process.on('message', (msg) => msg === BYE && process.exit(0)); - // first worker will bind to '0', second will try the assigned port and fail + // First worker will bind to '0', second will try the assigned port and fail const PRT1 = process.env.PRT1 || 0; const socket1 = dgram.createSocket('udp4', () => {}); socket1.on('error', PRT1 === 0 ? () => {} : assert.fail); diff --git a/test/parallel/test-async-hooks-http-parser-destroy.js b/test/parallel/test-async-hooks-http-parser-destroy.js index aeb805702d..d2e1071c28 100644 --- a/test/parallel/test-async-hooks-http-parser-destroy.js +++ b/test/parallel/test-async-hooks-http-parser-destroy.js @@ -36,7 +36,7 @@ const keepAliveAgent = new http.Agent({ const countdown = new Countdown(N, () => { server.close(() => { - // give the server sockets time to close (which will also free their + // Give the server sockets time to close (which will also free their // associated parser objects) after the server has been closed. setTimeout(() => { createdIds.forEach((createdAsyncId) => { diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js index bdba19ae66..cee8799496 100644 --- a/test/parallel/test-buffer-alloc.js +++ b/test/parallel/test-buffer-alloc.js @@ -106,7 +106,7 @@ b.copy(Buffer.alloc(1), 1, 1, 1); // try to copy 0 bytes from past the end of the source buffer b.copy(Buffer.alloc(1), 0, 2048, 2048); -// testing for smart defaults and ability to pass string values as offset +// Testing for smart defaults and ability to pass string values as offset { const writeTest = Buffer.from('abcdes'); writeTest.write('n', 'ascii'); @@ -799,7 +799,7 @@ common.expectsError( outOfRangeError ); -// attempt to overflow buffers, similar to previous bug in array buffers +// Attempt to overflow buffers, similar to previous bug in array buffers common.expectsError( () => Buffer.allocUnsafe(8).writeFloatLE(0.0, 0xffffffff), outOfRangeError diff --git a/test/parallel/test-buffer-compare-offset.js b/test/parallel/test-buffer-compare-offset.js index a437d8fa63..47e5f3041e 100644 --- a/test/parallel/test-buffer-compare-offset.js +++ b/test/parallel/test-buffer-compare-offset.js @@ -54,7 +54,7 @@ assert.strictEqual(a.compare(b, 0, { valueOf: () => 5 }), -1); // zero length target assert.strictEqual(a.compare(b, Infinity, -Infinity), 1); -// zero length target because default for targetEnd <= targetSource +// Zero length target because default for targetEnd <= targetSource assert.strictEqual(a.compare(b, '0xff'), 1); const oor = common.expectsError({ code: 'ERR_OUT_OF_RANGE' }, 7); diff --git a/test/parallel/test-buffer-copy.js b/test/parallel/test-buffer-copy.js index 6fb6a4ec70..e9f789a886 100644 --- a/test/parallel/test-buffer-copy.js +++ b/test/parallel/test-buffer-copy.js @@ -108,7 +108,7 @@ common.expectsError( errorProperty); { - // check sourceEnd resets to targetEnd if former is greater than the latter + // Check sourceEnd resets to targetEnd if former is greater than the latter b.fill(++cntr); c.fill(++cntr); b.copy(c, 0, 0, 1025); diff --git a/test/parallel/test-buffer-read.js b/test/parallel/test-buffer-read.js index 6f4ff3ca86..94e198fedc 100644 --- a/test/parallel/test-buffer-read.js +++ b/test/parallel/test-buffer-read.js @@ -13,22 +13,22 @@ function read(buff, funx, args, expected) { ); } -// testing basic functionality of readDoubleBE() and readDoubleLE() +// Testing basic functionality of readDoubleBE() and readDoubleLE() read(buf, 'readDoubleBE', [1], -3.1827727774563287e+295); read(buf, 'readDoubleLE', [1], -6.966010051009108e+144); -// testing basic functionality of readFloatBE() and readFloatLE() +// Testing basic functionality of readFloatBE() and readFloatLE() read(buf, 'readFloatBE', [1], -1.6691549692541768e+37); read(buf, 'readFloatLE', [1], -7861303808); // testing basic functionality of readInt8() read(buf, 'readInt8', [1], -3); -// testing basic functionality of readInt16BE() and readInt16LE() +// Testing basic functionality of readInt16BE() and readInt16LE() read(buf, 'readInt16BE', [1], -696); read(buf, 'readInt16LE', [1], 0x48fd); -// testing basic functionality of readInt32BE() and readInt32LE() +// Testing basic functionality of readInt32BE() and readInt32LE() read(buf, 'readInt32BE', [1], -45552945); read(buf, 'readInt32LE', [1], -806729475); @@ -39,11 +39,11 @@ read(buf, 'readIntLE', [2, 1], 0x48); // testing basic functionality of readUInt8() read(buf, 'readUInt8', [1], 0xfd); -// testing basic functionality of readUInt16BE() and readUInt16LE() +// Testing basic functionality of readUInt16BE() and readUInt16LE() read(buf, 'readUInt16BE', [2], 0x48ea); read(buf, 'readUInt16LE', [2], 0xea48); -// testing basic functionality of readUInt32BE() and readUInt32LE() +// Testing basic functionality of readUInt32BE() and readUInt32LE() read(buf, 'readUInt32BE', [1], 0xfd48eacf); read(buf, 'readUInt32LE', [1], 0xcfea48fd); diff --git a/test/parallel/test-buffer-tostring-range.js b/test/parallel/test-buffer-tostring-range.js index f6ee846dd8..436414e1b7 100644 --- a/test/parallel/test-buffer-tostring-range.js +++ b/test/parallel/test-buffer-tostring-range.js @@ -35,7 +35,7 @@ assert.strictEqual(rangeBuffer.toString('ascii', undefined, 3), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', false, 3), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', '', 3), 'abc'); -// but, if start is an integer when coerced, then it will be coerced and used. +// But, if start is an integer when coerced, then it will be coerced and used. assert.strictEqual(rangeBuffer.toString('ascii', '-1', 3), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', '1', 3), 'bc'); assert.strictEqual(rangeBuffer.toString('ascii', '-Infinity', 3), 'abc'); @@ -47,7 +47,7 @@ assert.strictEqual(rangeBuffer.toString('ascii', '-1.99', 3), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', 1.99, 3), 'bc'); assert.strictEqual(rangeBuffer.toString('ascii', true, 3), 'bc'); -// if end > buffer's length, end will be taken as buffer's length +// If end > buffer's length, end will be taken as buffer's length assert.strictEqual(rangeBuffer.toString('ascii', 0, 5), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', 0, 6.99), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', 0, Infinity), 'abc'); @@ -55,7 +55,7 @@ assert.strictEqual(rangeBuffer.toString('ascii', 0, '5'), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', 0, '6.99'), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', 0, 'Infinity'), 'abc'); -// if end is an invalid integer, end will be taken as buffer's length +// If end is an invalid integer, end will be taken as buffer's length assert.strictEqual(rangeBuffer.toString('ascii', 0, 'node.js'), ''); assert.strictEqual(rangeBuffer.toString('ascii', 0, {}), ''); assert.strictEqual(rangeBuffer.toString('ascii', 0, NaN), ''); @@ -66,7 +66,7 @@ assert.strictEqual(rangeBuffer.toString('ascii', 0, []), ''); assert.strictEqual(rangeBuffer.toString('ascii', 0, false), ''); assert.strictEqual(rangeBuffer.toString('ascii', 0, ''), ''); -// but, if end is an integer when coerced, then it will be coerced and used. +// But, if end is an integer when coerced, then it will be coerced and used. assert.strictEqual(rangeBuffer.toString('ascii', 0, '-1'), ''); assert.strictEqual(rangeBuffer.toString('ascii', 0, '1'), 'a'); assert.strictEqual(rangeBuffer.toString('ascii', 0, '-Infinity'), ''); diff --git a/test/parallel/test-child-process-spawn-typeerror.js b/test/parallel/test-child-process-spawn-typeerror.js index 82acaf8e08..71bfdfdfe8 100644 --- a/test/parallel/test-child-process-spawn-typeerror.js +++ b/test/parallel/test-child-process-spawn-typeerror.js @@ -91,7 +91,7 @@ const s = 'string'; const u = undefined; const n = null; -// function spawn(file=f [,args=a] [, options=o]) has valid combinations: +// Function spawn(file=f [,args=a] [, options=o]) has valid combinations: // (f) // (f, a) // (f, a, o) diff --git a/test/parallel/test-child-process-stdout-flush-exit.js b/test/parallel/test-child-process-stdout-flush-exit.js index f3fdf4949a..679d78269f 100644 --- a/test/parallel/test-child-process-stdout-flush-exit.js +++ b/test/parallel/test-child-process-stdout-flush-exit.js @@ -45,7 +45,7 @@ if (process.argv[2] === 'child') { assert.fail(`Unexpected parent stderr: ${data}`); }); - // check if we receive both 'hello' at start and 'goodbye' at end + // Check if we receive both 'hello' at start and 'goodbye' at end child.stdout.setEncoding('utf8'); child.stdout.on('data', function(data) { stdout += data; diff --git a/test/parallel/test-cluster-setup-master-multiple.js b/test/parallel/test-cluster-setup-master-multiple.js index b33acccd41..33d490df45 100644 --- a/test/parallel/test-cluster-setup-master-multiple.js +++ b/test/parallel/test-cluster-setup-master-multiple.js @@ -62,7 +62,7 @@ execs.forEach((v, i) => { }, i * 100); }); -// cluster emits 'setup' asynchronously, so we must stay alive long +// Cluster emits 'setup' asynchronously, so we must stay alive long // enough for that to happen setTimeout(() => { console.log('cluster setup complete'); diff --git a/test/parallel/test-cluster-worker-forced-exit.js b/test/parallel/test-cluster-worker-forced-exit.js index cc76b4ba3a..6d2bf4f537 100644 --- a/test/parallel/test-cluster-worker-forced-exit.js +++ b/test/parallel/test-cluster-worker-forced-exit.js @@ -26,7 +26,7 @@ const cluster = require('cluster'); const SENTINEL = 42; -// workers forcibly exit when control channel is disconnected, if +// Workers forcibly exit when control channel is disconnected, if // their .exitedAfterDisconnect flag isn't set // // test this by: diff --git a/test/parallel/test-cluster-worker-no-exit.js b/test/parallel/test-cluster-worker-no-exit.js index b87b58b3f8..ecd7c47f5a 100644 --- a/test/parallel/test-cluster-worker-no-exit.js +++ b/test/parallel/test-cluster-worker-no-exit.js @@ -30,7 +30,7 @@ let success; let worker; let server; -// workers do not exit on disconnect, they exit under normal node rules: when +// Workers do not exit on disconnect, they exit under normal node rules: when // they have nothing keeping their loop alive, like an active connection // // test this by: diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js index 92e66596d7..f781d61994 100644 --- a/test/parallel/test-console.js +++ b/test/parallel/test-console.js @@ -174,7 +174,7 @@ console.timeEnd(); console.time(NaN); console.timeEnd(NaN); -// make sure calling time twice without timeEnd doesn't reset the timer. +// Make sure calling time twice without timeEnd doesn't reset the timer. console.time('test'); const time = console._times.get('test'); setTimeout(() => { @@ -248,7 +248,7 @@ assert.ok(/^__proto__: \d+\.\d{3}ms$/.test(strings.shift().trim())); assert.ok(/^constructor: \d+\.\d{3}ms$/.test(strings.shift().trim())); assert.ok(/^hasOwnProperty: \d+\.\d{3}ms$/.test(strings.shift().trim())); -// verify that console.time() coerces label values to strings as expected +// Verify that console.time() coerces label values to strings as expected assert.ok(/^: \d+\.\d{3}ms$/.test(strings.shift().trim())); assert.ok(/^\[object Object\]: \d+\.\d{3}ms$/.test(strings.shift().trim())); assert.ok(/^\[object Object\]: \d+\.\d{3}ms$/.test(strings.shift().trim())); diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js index 01ce1d9996..b62ce1a5b0 100644 --- a/test/parallel/test-crypto-authenticated.js +++ b/test/parallel/test-crypto-authenticated.js @@ -122,7 +122,7 @@ for (const test of TEST_CASES) { hex += encrypt.final('hex'); const auth_tag = encrypt.getAuthTag(); - // only test basic encryption run if output is marked as tampered. + // Only test basic encryption run if output is marked as tampered. if (!test.tampered) { assert.strictEqual(hex, test.ct); assert.strictEqual(auth_tag.toString('hex'), test.tag); @@ -170,7 +170,7 @@ for (const test of TEST_CASES) { let hex = encrypt.update(test.plain, 'ascii', 'hex'); hex += encrypt.final('hex'); const auth_tag = encrypt.getAuthTag(); - // only test basic encryption run if output is marked as tampered. + // Only test basic encryption run if output is marked as tampered. if (!test.tampered) { assert.strictEqual(hex, test.ct); assert.strictEqual(auth_tag.toString('hex'), test.tag); diff --git a/test/parallel/test-dgram-bind-default-address.js b/test/parallel/test-dgram-bind-default-address.js index 762ead7c86..130d614c58 100644 --- a/test/parallel/test-dgram-bind-default-address.js +++ b/test/parallel/test-dgram-bind-default-address.js @@ -21,7 +21,7 @@ 'use strict'; const common = require('../common'); -// skip test in FreeBSD jails since 0.0.0.0 will resolve to default interface +// Skip test in FreeBSD jails since 0.0.0.0 will resolve to default interface if (common.inFreeBSDJail) common.skip('In a FreeBSD jail'); diff --git a/test/parallel/test-dgram-exclusive-implicit-bind.js b/test/parallel/test-dgram-exclusive-implicit-bind.js index 171b221ee2..4603507240 100644 --- a/test/parallel/test-dgram-exclusive-implicit-bind.js +++ b/test/parallel/test-dgram-exclusive-implicit-bind.js @@ -92,7 +92,7 @@ source.on('close', function() { if (process.env.BOUND === 'y') { source.bind(0); } else { - // cluster doesn't know about exclusive sockets, so it won't close them. This + // Cluster doesn't know about exclusive sockets, so it won't close them. This // is expected, its the same situation for timers, outgoing tcp connections, // etc, which also keep workers alive after disconnect was requested. source.unref(); diff --git a/test/parallel/test-dgram-ref.js b/test/parallel/test-dgram-ref.js index b3b8488297..0c5474b118 100644 --- a/test/parallel/test-dgram-ref.js +++ b/test/parallel/test-dgram-ref.js @@ -23,7 +23,7 @@ const common = require('../common'); const dgram = require('dgram'); -// should not hang, see https://github.com/nodejs/node-v0.x-archive/issues/1282 +// Should not hang, see https://github.com/nodejs/node-v0.x-archive/issues/1282 dgram.createSocket('udp4'); dgram.createSocket('udp6'); diff --git a/test/parallel/test-domain-crypto.js b/test/parallel/test-domain-crypto.js index 26ee6b888e..cb397c2fe3 100644 --- a/test/parallel/test-domain-crypto.js +++ b/test/parallel/test-domain-crypto.js @@ -33,7 +33,7 @@ common.allowGlobals(require('domain')); // See https://github.com/nodejs/node/commit/d1eff9ab global.domain = require('domain'); -// should not throw a 'TypeError: undefined is not a function' exception +// Should not throw a 'TypeError: undefined is not a function' exception crypto.randomBytes(8); crypto.randomBytes(8, common.mustCall()); const buf = Buffer.alloc(8); diff --git a/test/parallel/test-domain-from-timer.js b/test/parallel/test-domain-from-timer.js index 3f8252543c..419a8aa96e 100644 --- a/test/parallel/test-domain-from-timer.js +++ b/test/parallel/test-domain-from-timer.js @@ -25,7 +25,7 @@ require('../common'); const assert = require('assert'); -// timeouts call the callback directly from cc, so need to make sure the +// Timeouts call the callback directly from cc, so need to make sure the // domain will be used regardless setTimeout(() => { const domain = require('domain'); diff --git a/test/parallel/test-event-emitter-check-listener-leaks.js b/test/parallel/test-event-emitter-check-listener-leaks.js index 7688c61a43..037d090e63 100644 --- a/test/parallel/test-event-emitter-check-listener-leaks.js +++ b/test/parallel/test-event-emitter-check-listener-leaks.js @@ -88,7 +88,7 @@ const events = require('events'); assert.ok(e._events.fortytwo.hasOwnProperty('warned')); } -// but _maxListeners still has precedence over defaultMaxListeners +// But _maxListeners still has precedence over defaultMaxListeners { events.EventEmitter.defaultMaxListeners = 42; const e = new events.EventEmitter(); diff --git a/test/parallel/test-force-repl-with-eval.js b/test/parallel/test-force-repl-with-eval.js index 8c75818508..3f81d362d4 100644 --- a/test/parallel/test-force-repl-with-eval.js +++ b/test/parallel/test-force-repl-with-eval.js @@ -3,7 +3,7 @@ require('../common'); const assert = require('assert'); const spawn = require('child_process').spawn; -// spawn a node child process in "interactive" mode (force the repl) and eval +// Spawn a node child process in "interactive" mode (force the repl) and eval const cp = spawn(process.execPath, ['-i', '-e', 'console.log("42")']); let gotToEnd = false; diff --git a/test/parallel/test-fs-append-file.js b/test/parallel/test-fs-append-file.js index 4d8f66682e..20cba235f0 100644 --- a/test/parallel/test-fs-append-file.js +++ b/test/parallel/test-fs-append-file.js @@ -42,7 +42,7 @@ tmpdir.refresh(); const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; -// test that empty file will be created and have content added (callback API) +// Test that empty file will be created and have content added (callback API) { const filename = join(tmpdir.path, 'append.txt'); @@ -56,7 +56,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; })); } -// test that empty file will be created and have content added (promise API) +// Test that empty file will be created and have content added (promise API) { const filename = join(tmpdir.path, 'append-promise.txt'); diff --git a/test/parallel/test-fs-read-stream-double-close.js b/test/parallel/test-fs-read-stream-double-close.js index 38556e6e64..32117a0a1e 100644 --- a/test/parallel/test-fs-read-stream-double-close.js +++ b/test/parallel/test-fs-read-stream-double-close.js @@ -13,7 +13,7 @@ const fs = require('fs'); { const s = fs.createReadStream(__filename); - // this is a private API, but it is worth testing. close calls this + // This is a private API, but it is worth testing. close calls this s.destroy(null, common.mustCall()); s.destroy(null, common.mustCall()); } diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index 18b9de471b..5c1c0cd962 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -251,7 +251,7 @@ function test_relative_input_cwd(realpath, realpathSync, callback) { return callback(); } - // we need to calculate the relative path to the tmp dir from cwd + // We need to calculate the relative path to the tmp dir from cwd const entrydir = process.cwd(); const entry = path.relative(entrydir, path.join(`${tmpDir}/cycles/realpath-3a`)); diff --git a/test/parallel/test-fs-sync-fd-leak.js b/test/parallel/test-fs-sync-fd-leak.js index 118d78c121..52f6f38f9c 100644 --- a/test/parallel/test-fs-sync-fd-leak.js +++ b/test/parallel/test-fs-sync-fd-leak.js @@ -27,7 +27,7 @@ const fs = require('fs'); const { internalBinding } = require('internal/test/binding'); const { UV_EBADF } = internalBinding('uv'); -// ensure that (read|write|append)FileSync() closes the file descriptor +// Ensure that (read|write|append)FileSync() closes the file descriptor fs.openSync = function() { return 42; }; diff --git a/test/parallel/test-fs-utimes.js b/test/parallel/test-fs-utimes.js index 92558eef14..43fbe41dcc 100644 --- a/test/parallel/test-fs-utimes.js +++ b/test/parallel/test-fs-utimes.js @@ -186,7 +186,7 @@ process.on('exit', () => { const path = `${tmpdir.path}/test-utimes-precision`; fs.writeFileSync(path, ''); -// test Y2K38 for all platforms [except 'arm', 'OpenBSD' and 'SunOS'] +// Test Y2K38 for all platforms [except 'arm', 'OpenBSD' and 'SunOS'] if (!process.arch.includes('arm') && !common.isOpenBSD && !common.isSunOS) { // because 2 ** 31 doesn't look right // eslint-disable-next-line space-infix-ops diff --git a/test/parallel/test-fs-write-stream-change-open.js b/test/parallel/test-fs-write-stream-change-open.js index 8f79e59427..56dbafd656 100644 --- a/test/parallel/test-fs-write-stream-change-open.js +++ b/test/parallel/test-fs-write-stream-change-open.js @@ -35,7 +35,7 @@ const stream = fs.WriteStream(file); const _fs_close = fs.close; const _fs_open = fs.open; -// change the fs.open with an identical function after the WriteStream +// Change the fs.open with an identical function after the WriteStream // has pushed it onto its internal action queue, but before it's // returned. This simulates AOP-style extension of the fs lib. fs.open = function() { diff --git a/test/parallel/test-heapdump-inspector.js b/test/parallel/test-heapdump-inspector.js index 963b85ac3a..d46be57c91 100644 --- a/test/parallel/test-heapdump-inspector.js +++ b/test/parallel/test-heapdump-inspector.js @@ -13,7 +13,7 @@ const snapshotNode = { ] }; -// starts with no JSBindingsConnection (or 1 if coverage enabled). +// Starts with no JSBindingsConnection (or 1 if coverage enabled). { const expected = []; if (process.env.NODE_V8_COVERAGE) { diff --git a/test/parallel/test-http-agent-false.js b/test/parallel/test-http-agent-false.js index 4d92d5e01e..2f4505ef66 100644 --- a/test/parallel/test-http-agent-false.js +++ b/test/parallel/test-http-agent-false.js @@ -23,7 +23,7 @@ const common = require('../common'); const http = require('http'); -// sending `agent: false` when `port: null` is also passed in (i.e. the result +// Sending `agent: false` when `port: null` is also passed in (i.e. the result // of a `url.parse()` call with the default port used, 80 or 443), should not // result in an assertion error... const opts = { @@ -34,7 +34,7 @@ const opts = { agent: false }; -// we just want an "error" (no local HTTP server on port 80) or "response" +// We just want an "error" (no local HTTP server on port 80) or "response" // to happen (user happens ot have HTTP server running on port 80). // As long as the process doesn't crash from a C++ assertion then we're good. const req = http.request(opts); diff --git a/test/parallel/test-http-agent-no-protocol.js b/test/parallel/test-http-agent-no-protocol.js index b5a144abc9..d1eaf242a5 100644 --- a/test/parallel/test-http-agent-no-protocol.js +++ b/test/parallel/test-http-agent-no-protocol.js @@ -29,7 +29,7 @@ const server = http.createServer(common.mustCall((req, res) => { })).listen(0, '127.0.0.1', common.mustCall(() => { const opts = url.parse(`http://127.0.0.1:${server.address().port}/`); - // remove the `protocol` field… the `http` module should fall back + // Remove the `protocol` field… the `http` module should fall back // to "http:", as defined by the global, default `http.Agent` instance. opts.agent = new http.Agent(); opts.agent.protocol = null; diff --git a/test/parallel/test-http-client-headers-array.js b/test/parallel/test-http-client-headers-array.js index c637de61c0..31ee35a123 100644 --- a/test/parallel/test-http-client-headers-array.js +++ b/test/parallel/test-http-client-headers-array.js @@ -39,7 +39,7 @@ function execute(options) { }); } -// should be the same except for implicit Host header on the first two +// Should be the same except for implicit Host header on the first two execute({ headers: { 'x-foo': 'boom', 'cookie': 'a=1; b=2; c=3' } }); execute({ headers: { 'x-foo': 'boom', 'cookie': [ 'a=1', 'b=2', 'c=3' ] } }); execute({ headers: [[ 'x-foo', 'boom' ], [ 'cookie', 'a=1; b=2; c=3' ]] }); diff --git a/test/parallel/test-http-conn-reset.js b/test/parallel/test-http-conn-reset.js index 7d0509a89f..fef75b7289 100644 --- a/test/parallel/test-http-conn-reset.js +++ b/test/parallel/test-http-conn-reset.js @@ -31,7 +31,7 @@ const options = { }; process.env.NODE_DEBUG = 'http'; -// start a tcp server that closes incoming connections immediately +// Start a tcp server that closes incoming connections immediately const server = net.createServer(function(client) { client.destroy(); server.close(); diff --git a/test/parallel/test-http-outgoing-message-inheritance.js b/test/parallel/test-http-outgoing-message-inheritance.js index 05a241dc8b..9beb4aeff1 100644 --- a/test/parallel/test-http-outgoing-message-inheritance.js +++ b/test/parallel/test-http-outgoing-message-inheritance.js @@ -5,7 +5,7 @@ const { OutgoingMessage } = require('http'); const { Writable } = require('stream'); const assert = require('assert'); -// check that OutgoingMessage can be used without a proper Socket +// Check that OutgoingMessage can be used without a proper Socket // Fixes: https://github.com/nodejs/node/issues/14386 // Fixes: https://github.com/nodejs/node/issues/14381 diff --git a/test/parallel/test-http-remove-header-stays-removed.js b/test/parallel/test-http-remove-header-stays-removed.js index 337fcd3bec..09a4475388 100644 --- a/test/parallel/test-http-remove-header-stays-removed.js +++ b/test/parallel/test-http-remove-header-stays-removed.js @@ -26,7 +26,7 @@ const assert = require('assert'); const http = require('http'); const server = http.createServer(function(request, response) { - // removed headers should stay removed, even if node automatically adds them + // Removed headers should stay removed, even if node automatically adds them // to the output: response.removeHeader('connection'); response.removeHeader('transfer-encoding'); 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 c10f5ed7b0..eb96ac19c1 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 @@ -41,7 +41,7 @@ const server = http.createServer(function(request, response) { server.listen(0, function() { const testURL = url.parse(`http://asdf:qwer@localhost:${this.address().port}`); - // the test here is if you set a specific authorization header in the + // The test here is if you set a specific authorization header in the // request we should not override that with basic auth testURL.headers = { Authorization: 'NoAuthForYOU' diff --git a/test/parallel/test-http2-client-onconnect-errors.js b/test/parallel/test-http2-client-onconnect-errors.js index e72b5f454b..ab166c22f0 100644 --- a/test/parallel/test-http2-client-onconnect-errors.js +++ b/test/parallel/test-http2-client-onconnect-errors.js @@ -65,7 +65,7 @@ const tests = specificTests.concat(genericTests); let currentError; -// mock submitRequest because we only care about testing error handling +// Mock submitRequest because we only care about testing error handling Http2Session.prototype.request = () => currentError; const server = http2.createServer(common.mustNotCall()); diff --git a/test/parallel/test-http2-client-setNextStreamID-errors.js b/test/parallel/test-http2-client-setNextStreamID-errors.js index 3fb4728b7d..39d194e1f5 100644 --- a/test/parallel/test-http2-client-setNextStreamID-errors.js +++ b/test/parallel/test-http2-client-setNextStreamID-errors.js @@ -37,7 +37,7 @@ server.listen(0, common.mustCall(() => { } ); - // should throw if something other than number is passed to setNextStreamID + // Should throw if something other than number is passed to setNextStreamID Object.entries(types).forEach(([type, value]) => { if (type === 'number') { return; diff --git a/test/parallel/test-http2-compat-serverresponse-headers-after-destroy.js b/test/parallel/test-http2-compat-serverresponse-headers-after-destroy.js index 206bd1c9d4..fc97a70f42 100644 --- a/test/parallel/test-http2-compat-serverresponse-headers-after-destroy.js +++ b/test/parallel/test-http2-compat-serverresponse-headers-after-destroy.js @@ -6,7 +6,7 @@ if (!common.hasCrypto) const assert = require('assert'); const h2 = require('http2'); -// makes sure that Http2ServerResponse setHeader & removeHeader, do not throw +// Makes sure that Http2ServerResponse setHeader & removeHeader, do not throw // any errors if the stream was destroyed before headers were sent const server = h2.createServer(); diff --git a/test/parallel/test-http2-compat-socket.js b/test/parallel/test-http2-compat-socket.js index 498677af6e..5b61f27bb2 100644 --- a/test/parallel/test-http2-compat-socket.js +++ b/test/parallel/test-http2-compat-socket.js @@ -62,7 +62,7 @@ server.on('request', common.mustCall(function(request, response) { }); })); - // properties that do not exist on the proxy are retrieved from the socket + // Properties that do not exist on the proxy are retrieved from the socket assert.ok(request.socket._server); assert.strictEqual(request.socket.connecting, false); diff --git a/test/parallel/test-http2-connect-method.js b/test/parallel/test-http2-connect-method.js index 0ddbc60433..46c5bf9795 100644 --- a/test/parallel/test-http2-connect-method.js +++ b/test/parallel/test-http2-connect-method.js @@ -55,7 +55,7 @@ server.listen(0, common.mustCall(() => { proxy.listen(0, () => { const client = http2.connect(`http://localhost:${proxy.address().port}`); - // confirm that :authority is required and :scheme & :path are forbidden + // Confirm that :authority is required and :scheme & :path are forbidden common.expectsError( () => client.request({ [HTTP2_HEADER_METHOD]: 'CONNECT' diff --git a/test/parallel/test-http2-connect.js b/test/parallel/test-http2-connect.js index 252efa1229..b93faf9d93 100644 --- a/test/parallel/test-http2-connect.js +++ b/test/parallel/test-http2-connect.js @@ -33,7 +33,7 @@ const { connect: netConnect } = require('net'); })); } -// check for session connect callback on already connected socket +// Check for session connect callback on already connected socket { const server = createServer(); server.listen(0, mustCall(() => { diff --git a/test/parallel/test-http2-info-headers-errors.js b/test/parallel/test-http2-info-headers-errors.js index e2cae58466..6540747fd2 100644 --- a/test/parallel/test-http2-info-headers-errors.js +++ b/test/parallel/test-http2-info-headers-errors.js @@ -39,7 +39,7 @@ const tests = specificTests.concat(genericTests); let currentError; -// mock sendHeaders because we only care about testing error handling +// Mock sendHeaders because we only care about testing error handling Http2Stream.prototype.info = () => currentError.ngError; const server = http2.createServer(); diff --git a/test/parallel/test-http2-respond-nghttperrors.js b/test/parallel/test-http2-respond-nghttperrors.js index 5ebd24a65b..d720ec1fa4 100644 --- a/test/parallel/test-http2-respond-nghttperrors.js +++ b/test/parallel/test-http2-respond-nghttperrors.js @@ -40,7 +40,7 @@ const tests = specificTests.concat(genericTests); let currentError; -// mock submitResponse because we only care about testing error handling +// Mock submitResponse because we only care about testing error handling Http2Stream.prototype.respond = () => currentError.ngError; const server = http2.createServer(); diff --git a/test/parallel/test-http2-respond-with-fd-errors.js b/test/parallel/test-http2-respond-with-fd-errors.js index 9dfd95ea5a..f336d9caac 100644 --- a/test/parallel/test-http2-respond-with-fd-errors.js +++ b/test/parallel/test-http2-respond-with-fd-errors.js @@ -47,7 +47,7 @@ const tests = specificTests.concat(genericTests); let currentError; -// mock `respond` because we only care about testing error handling +// Mock `respond` because we only care about testing error handling Http2Stream.prototype.respond = () => currentError.ngError; const server = http2.createServer(); diff --git a/test/parallel/test-http2-server-push-stream-errors.js b/test/parallel/test-http2-server-push-stream-errors.js index e489cae439..fb6fc11b63 100644 --- a/test/parallel/test-http2-server-push-stream-errors.js +++ b/test/parallel/test-http2-server-push-stream-errors.js @@ -64,7 +64,7 @@ const tests = specificTests.concat(genericTests); let currentError; -// mock submitPushPromise because we only care about testing error handling +// Mock submitPushPromise because we only care about testing error handling Http2Stream.prototype.pushPromise = () => currentError.ngError; const server = http2.createServer(); diff --git a/test/parallel/test-https-argument-of-creating.js b/test/parallel/test-https-argument-of-creating.js index 0630028406..1154f968d7 100644 --- a/test/parallel/test-https-argument-of-creating.js +++ b/test/parallel/test-https-argument-of-creating.js @@ -22,7 +22,7 @@ const dftProtocol = {}; } -// validate that `createServer` can work with the only argument requestListener +// Validate that `createServer` can work with the only argument requestListener { const mustNotCall = common.mustNotCall(); const server = https.createServer(mustNotCall); diff --git a/test/parallel/test-listen-fd-cluster.js b/test/parallel/test-listen-fd-cluster.js index da8abd8683..bc81a8da0b 100644 --- a/test/parallel/test-listen-fd-cluster.js +++ b/test/parallel/test-listen-fd-cluster.js @@ -47,14 +47,14 @@ process.on('exit', function() { assert.ok(ok); }); -// spawn the parent, and listen for it to tell us the pid of the cluster. +// Spawn the parent, and listen for it to tell us the pid of the cluster. // WARNING: This is an example of listening on some arbitrary FD number // that has already been bound elsewhere in advance. However, binding // server handles to stdio fd's is NOT a good or reliable way to do // concurrency in HTTP servers! Use the cluster module, or if you want // a more low-level approach, use child process IPC manually. test(function(parent, port) { - // now make sure that we can request to the worker, then kill it. + // Now make sure that we can request to the worker, then kill it. http.get({ server: 'localhost', port: port, diff --git a/test/parallel/test-listen-fd-detached-inherit.js b/test/parallel/test-listen-fd-detached-inherit.js index 4feb7dc3ab..e0fc25134c 100644 --- a/test/parallel/test-listen-fd-detached-inherit.js +++ b/test/parallel/test-listen-fd-detached-inherit.js @@ -35,7 +35,7 @@ switch (process.argv[2]) { default: return test(); } -// spawn the parent, and listen for it to tell us the pid of the child. +// Spawn the parent, and listen for it to tell us the pid of the child. // WARNING: This is an example of listening on some arbitrary FD number // that has already been bound elsewhere in advance. However, binding // server handles to stdio fd's is NOT a good or reliable way to do @@ -53,7 +53,7 @@ function test() { function next() { console.error('output from parent = %s', json); const child = JSON.parse(json); - // now make sure that we can request to the subprocess, then kill it. + // Now make sure that we can request to the subprocess, then kill it. http.get({ server: 'localhost', port: child.port, diff --git a/test/parallel/test-listen-fd-detached.js b/test/parallel/test-listen-fd-detached.js index 09d7f8b6c1..eec12132a1 100644 --- a/test/parallel/test-listen-fd-detached.js +++ b/test/parallel/test-listen-fd-detached.js @@ -35,7 +35,7 @@ switch (process.argv[2]) { default: return test(); } -// spawn the parent, and listen for it to tell us the pid of the child. +// Spawn the parent, and listen for it to tell us the pid of the child. // WARNING: This is an example of listening on some arbitrary FD number // that has already been bound elsewhere in advance. However, binding // server handles to stdio fd's is NOT a good or reliable way to do @@ -53,7 +53,7 @@ function test() { function next() { console.error('output from parent = %s', json); const child = JSON.parse(json); - // now make sure that we can request to the subprocess, then kill it. + // Now make sure that we can request to the subprocess, then kill it. http.get({ server: 'localhost', port: child.port, diff --git a/test/parallel/test-listen-fd-server.js b/test/parallel/test-listen-fd-server.js index 7cdba8b405..a09a01f219 100644 --- a/test/parallel/test-listen-fd-server.js +++ b/test/parallel/test-listen-fd-server.js @@ -44,7 +44,7 @@ process.on('exit', function() { // concurrency in HTTP servers! Use the cluster module, or if you want // a more low-level approach, use child process IPC manually. test(function(child, port) { - // now make sure that we can request to the subprocess, then kill it. + // Now make sure that we can request to the subprocess, then kill it. http.get({ server: 'localhost', port: port, diff --git a/test/parallel/test-net-pipe-connect-errors.js b/test/parallel/test-net-pipe-connect-errors.js index 8db4526699..330203365e 100644 --- a/test/parallel/test-net-pipe-connect-errors.js +++ b/test/parallel/test-net-pipe-connect-errors.js @@ -32,7 +32,7 @@ const assert = require('assert'); let emptyTxt; if (common.isWindows) { - // on Win, common.PIPE will be a named pipe, so we use an existing empty + // On Win, common.PIPE will be a named pipe, so we use an existing empty // file instead emptyTxt = fixtures.path('empty.txt'); } else { diff --git a/test/parallel/test-net-server-connections.js b/test/parallel/test-net-server-connections.js index 9e1213ada5..52b2fe6bf5 100644 --- a/test/parallel/test-net-server-connections.js +++ b/test/parallel/test-net-server-connections.js @@ -32,7 +32,7 @@ const expectedWarning = 'Server.connections property is deprecated. ' + common.expectWarning('DeprecationWarning', expectedWarning, 'DEP0020'); -// test that server.connections property is no longer enumerable now that it +// Test that server.connections property is no longer enumerable now that it // has been marked as deprecated assert.strictEqual(Object.keys(server).includes('connections'), false); diff --git a/test/parallel/test-net-socket-setnodelay.js b/test/parallel/test-net-socket-setnodelay.js index be5c8ffc85..55b4c773fa 100644 --- a/test/parallel/test-net-socket-setnodelay.js +++ b/test/parallel/test-net-socket-setnodelay.js @@ -32,7 +32,7 @@ socket = new net.Socket({ }); falseyValues.forEach((testVal) => socket.setNoDelay(testVal)); -// if a handler doesn't have a setNoDelay function it shouldn't be called. +// If a handler doesn't have a setNoDelay function it shouldn't be called. // In the case below, if it is called an exception will be thrown socket = new net.Socket({ handle: { diff --git a/test/parallel/test-net-stream.js b/test/parallel/test-net-stream.js index 4e7e06bfcf..8e996dd58a 100644 --- a/test/parallel/test-net-stream.js +++ b/test/parallel/test-net-stream.js @@ -27,7 +27,7 @@ const net = require('net'); const s = new net.Stream(); -// test that destroy called on a stream with a server only ever decrements the +// Test that destroy called on a stream with a server only ever decrements the // server connection count once s.server = new net.Server(); diff --git a/test/parallel/test-path-zero-length-strings.js b/test/parallel/test-path-zero-length-strings.js index c1b74c515f..f6516ffff8 100644 --- a/test/parallel/test-path-zero-length-strings.js +++ b/test/parallel/test-path-zero-length-strings.js @@ -10,7 +10,7 @@ const assert = require('assert'); const path = require('path'); const pwd = process.cwd(); -// join will internally ignore all the zero-length strings and it will return +// Join will internally ignore all the zero-length strings and it will return // '.' if the joined string is a zero-length string. assert.strictEqual(path.posix.join(''), '.'); assert.strictEqual(path.posix.join('', ''), '.'); @@ -19,7 +19,7 @@ assert.strictEqual(path.win32.join('', ''), '.'); assert.strictEqual(path.join(pwd), pwd); assert.strictEqual(path.join(pwd, ''), pwd); -// normalize will return '.' if the input is a zero-length string +// Normalize will return '.' if the input is a zero-length string assert.strictEqual(path.posix.normalize(''), '.'); assert.strictEqual(path.win32.normalize(''), '.'); assert.strictEqual(path.normalize(pwd), pwd); @@ -28,12 +28,12 @@ assert.strictEqual(path.normalize(pwd), pwd); assert.strictEqual(path.posix.isAbsolute(''), false); assert.strictEqual(path.win32.isAbsolute(''), false); -// resolve, internally ignores all the zero-length strings and returns the +// Resolve, internally ignores all the zero-length strings and returns the // current working directory assert.strictEqual(path.resolve(''), pwd); assert.strictEqual(path.resolve('', ''), pwd); -// relative, internally calls resolve. So, '' is actually the current directory +// Relative, internally calls resolve. So, '' is actually the current directory assert.strictEqual(path.relative('', pwd), ''); assert.strictEqual(path.relative(pwd, ''), ''); assert.strictEqual(path.relative(pwd, pwd), ''); diff --git a/test/parallel/test-process-beforeexit.js b/test/parallel/test-process-beforeexit.js index d197d943a4..215e73dc06 100644 --- a/test/parallel/test-process-beforeexit.js +++ b/test/parallel/test-process-beforeexit.js @@ -46,7 +46,7 @@ function tryListen() { })); } -// test that a function invoked from the beforeExit handler can use a timer +// Test that a function invoked from the beforeExit handler can use a timer // to keep the event loop open, which can use another timer to keep the event // loop open, etc. function tryRepeatedTimer() { diff --git a/test/parallel/test-process-env-allowed-flags.js b/test/parallel/test-process-env-allowed-flags.js index 13bc8a4a01..a2c9bfc4d6 100644 --- a/test/parallel/test-process-env-allowed-flags.js +++ b/test/parallel/test-process-env-allowed-flags.js @@ -3,7 +3,7 @@ const assert = require('assert'); require('../common'); -// assert legit flags are allowed, and bogus flags are disallowed +// Assert legit flags are allowed, and bogus flags are disallowed { const goodFlags = [ '--perf_basic_prof', diff --git a/test/parallel/test-process-env.js b/test/parallel/test-process-env.js index 81651efbea..d146d5c616 100644 --- a/test/parallel/test-process-env.js +++ b/test/parallel/test-process-env.js @@ -65,7 +65,7 @@ if (process.argv[2] === 'you-are-the-child') { } -// delete should return true except for non-configurable properties +// Delete should return true except for non-configurable properties // https://github.com/nodejs/node/issues/7960 delete process.env.NON_EXISTING_VARIABLE; assert(delete process.env.NON_EXISTING_VARIABLE); diff --git a/test/parallel/test-process-exit-recursive.js b/test/parallel/test-process-exit-recursive.js index 57f5c2956f..727aa4abe7 100644 --- a/test/parallel/test-process-exit-recursive.js +++ b/test/parallel/test-process-exit-recursive.js @@ -23,14 +23,14 @@ require('../common'); const assert = require('assert'); -// recursively calling .exit() should not overflow the call stack +// Recursively calling .exit() should not overflow the call stack let nexits = 0; process.on('exit', function(code) { assert.strictEqual(nexits++, 0); assert.strictEqual(code, 1); - // now override the exit code of 1 with 0 so that the test passes + // Now override the exit code of 1 with 0 so that the test passes process.exit(0); }); diff --git a/test/parallel/test-process-exit.js b/test/parallel/test-process-exit.js index ac934d4c68..cd605949af 100644 --- a/test/parallel/test-process-exit.js +++ b/test/parallel/test-process-exit.js @@ -23,7 +23,7 @@ require('../common'); const assert = require('assert'); -// calling .exit() from within "exit" should not overflow the call stack +// Calling .exit() from within "exit" should not overflow the call stack let nexits = 0; process.on('exit', function(code) { diff --git a/test/parallel/test-process-release.js b/test/parallel/test-process-release.js index 019903d093..f36062da4d 100644 --- a/test/parallel/test-process-release.js +++ b/test/parallel/test-process-release.js @@ -7,7 +7,7 @@ const versionParts = process.versions.node.split('.'); assert.strictEqual(process.release.name, 'node'); -// it's expected that future LTS release lines will have additional +// It's expected that future LTS release lines will have additional // branches in here if (versionParts[0] === '4' && versionParts[1] >= 2) { assert.strictEqual(process.release.lts, 'Argon'); diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js index ec553832c4..408d70e788 100644 --- a/test/parallel/test-readline-interface.js +++ b/test/parallel/test-readline-interface.js @@ -189,7 +189,7 @@ function isWarned(emitter) { rli.close(); } - // sending multiple newlines at once that does not end with a new line + // Sending multiple newlines at once that does not end with a new line { const fi = new FakeInput(); const rli = new readline.Interface( @@ -206,7 +206,7 @@ function isWarned(emitter) { rli.close(); } - // sending multiple newlines at once that does not end with a new(empty) + // Sending multiple newlines at once that does not end with a new(empty) // line and a `end` event { const fi = new FakeInput(); @@ -228,7 +228,7 @@ function isWarned(emitter) { rli.close(); } - // sending multiple newlines at once that does not end with a new line + // Sending multiple newlines at once that does not end with a new line // and a `end` event(last line is) // \r should behave like \n when alone @@ -354,7 +354,7 @@ function isWarned(emitter) { rli.close(); } - // constructor throws if completer is not a function or undefined + // Constructor throws if completer is not a function or undefined { const fi = new FakeInput(); common.expectsError(function() { @@ -979,7 +979,7 @@ function isWarned(emitter) { assert.strictEqual(isWarned(process.stdout._events), false); } - // can create a new readline Interface with a null output argument + // Can create a new readline Interface with a null output argument { const fi = new FakeInput(); const rli = new readline.Interface( @@ -1037,7 +1037,7 @@ function isWarned(emitter) { const crlfDelay = Infinity; [ true, false ].forEach(function(terminal) { - // sending multiple newlines at once that does not end with a new line + // Sending multiple newlines at once that does not end with a new line // and a `end` event(last line is) // \r\n should emit one line event, not two diff --git a/test/parallel/test-repl-save-load.js b/test/parallel/test-repl-save-load.js index 7ca0e9c016..2767c0f026 100644 --- a/test/parallel/test-repl-save-load.js +++ b/test/parallel/test-repl-save-load.js @@ -97,7 +97,7 @@ let loadFile = join(tmpdir.path, 'file.does.not.exist'); // should not break putIn.write = function(data) { - // make sure I get a failed to load message and not some crazy error + // Make sure I get a failed to load message and not some crazy error assert.strictEqual(data, `Failed to load:${loadFile}\n`); // eat me to avoid work putIn.write = () => {}; @@ -121,7 +121,7 @@ const invalidFileName = join(tmpdir.path, '\0\0\0\0\0'); // should not break putIn.write = function(data) { - // make sure I get a failed to save message and not some other error + // Make sure I get a failed to save message and not some other error assert.strictEqual(data, `Failed to save:${invalidFileName}\n`); // reset to no-op putIn.write = () => {}; diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index 378072ecb8..9edebe9036 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/test/parallel/test-repl-tab-complete.js @@ -207,7 +207,7 @@ testMe.complete(' ', common.mustCall(function(error, data) { clearTimeout(spaceTimeout); })); -// tab completion should pick up the global "toString" object, and +// Tab completion should pick up the global "toString" object, and // any other properties up the "global" object's prototype chain testMe.complete('toSt', common.mustCall(function(error, data) { assert.deepStrictEqual(data, [['toString'], 'toSt']); diff --git a/test/parallel/test-repl-unexpected-token-recoverable.js b/test/parallel/test-repl-unexpected-token-recoverable.js index 652c17d8f8..c4b3a08e96 100644 --- a/test/parallel/test-repl-unexpected-token-recoverable.js +++ b/test/parallel/test-repl-unexpected-token-recoverable.js @@ -6,7 +6,7 @@ require('../common'); const assert = require('assert'); const spawn = require('child_process').spawn; -// use -i to force node into interactive mode, despite stdout not being a TTY +// Use -i to force node into interactive mode, despite stdout not being a TTY const args = [ '-i' ]; const child = spawn(process.execPath, args); diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index f8261dedd9..98f47a03aa 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -204,13 +204,13 @@ const errorTests = [ send: 'JSON.parse(\'{"valid": "json"}\');', expect: '{ valid: \'json\' }' }, - // invalid input to JSON.parse error is special case of syntax error, + // Invalid input to JSON.parse error is special case of syntax error, // should throw { send: 'JSON.parse(\'{invalid: \\\'json\\\'}\');', expect: [/^SyntaxError: /, ''] }, - // end of input to JSON.parse error is special case of syntax error, + // End of input to JSON.parse error is special case of syntax error, // should throw { send: 'JSON.parse(\'066\');', @@ -380,19 +380,19 @@ const errorTests = [ send: 'var path = 42; path', expect: '42' }, - // this makes sure that we don't print `undefined` when we actually print + // This makes sure that we don't print `undefined` when we actually print // the error message { send: '.invalid_repl_command', expect: 'Invalid REPL keyword' }, - // this makes sure that we don't crash when we use an inherited property as + // This makes sure that we don't crash when we use an inherited property as // a REPL command { send: '.toString', expect: 'Invalid REPL keyword' }, - // fail when we are not inside a String and a line continuation is used + // Fail when we are not inside a String and a line continuation is used { send: '[] \\', expect: [ @@ -421,7 +421,7 @@ const errorTests = [ send: '\'the \\\n fourth\t\t\\\n eye \'', expect: '... ... \'the fourth\\t\\t eye \'' }, - // more than one multiline strings also should preserve whitespace chars + // More than one multiline strings also should preserve whitespace chars { send: '\'the \\\n fourth\' + \'\t\t\\\n eye \'', expect: '... ... \'the fourth\\t\\t eye \'' @@ -431,7 +431,7 @@ const errorTests = [ send: '\'\\\n.break', expect: '... ' + prompt_unix }, - // using REPL command "help" within a string literal should still work + // Using REPL command "help" within a string literal should still work { send: '\'thefourth\\\n.help\neye\'', expect: [ @@ -450,7 +450,7 @@ const errorTests = [ send: '\n\r\n\r\n', expect: '' }, - // empty lines in the string literals should not affect the string + // Empty lines in the string literals should not affect the string { send: '\'the\\\n\\\nfourtheye\'\n', expect: '... ... \'thefourtheye\'' @@ -460,14 +460,14 @@ const errorTests = [ send: '/(.)(.)(.)(.)(.)(.)(.)(.)(.)/.test(\'123456789\')\n', expect: 'true' }, - // the following test's result depends on the RegExp's match from the above + // The following test's result depends on the RegExp's match from the above { send: 'RegExp.$1\nRegExp.$2\nRegExp.$3\nRegExp.$4\nRegExp.$5\n' + 'RegExp.$6\nRegExp.$7\nRegExp.$8\nRegExp.$9\n', expect: ['\'1\'', '\'2\'', '\'3\'', '\'4\'', '\'5\'', '\'6\'', '\'7\'', '\'8\'', '\'9\''] }, - // regression tests for https://github.com/nodejs/node/issues/2749 + // Regression tests for https://github.com/nodejs/node/issues/2749 { send: 'function x() {\nreturn \'\\n\';\n }', expect: '... ... undefined' @@ -476,7 +476,7 @@ const errorTests = [ send: 'function x() {\nreturn \'\\\\\';\n }', expect: '... ... undefined' }, - // regression tests for https://github.com/nodejs/node/issues/3421 + // Regression tests for https://github.com/nodejs/node/issues/3421 { send: 'function x() {\n//\'\n }', expect: '... ... undefined' diff --git a/test/parallel/test-stream-readable-hwm-0.js b/test/parallel/test-stream-readable-hwm-0.js index ecbc197d48..b66782b771 100644 --- a/test/parallel/test-stream-readable-hwm-0.js +++ b/test/parallel/test-stream-readable-hwm-0.js @@ -16,7 +16,7 @@ const r = new Readable({ }); let pushedNull = false; -// this will trigger read(0) but must only be called after push(null) +// This will trigger read(0) but must only be called after push(null) // because the we haven't pushed any data r.on('readable', common.mustCall(() => { assert.strictEqual(r.read(), null); diff --git a/test/parallel/test-stream-readable-reading-readingMore.js b/test/parallel/test-stream-readable-reading-readingMore.js index 71c07d7b06..74468ed68a 100644 --- a/test/parallel/test-stream-readable-reading-readingMore.js +++ b/test/parallel/test-stream-readable-reading-readingMore.js @@ -143,7 +143,7 @@ const Readable = require('stream').Readable; readable.on('end', common.mustCall(onStreamEnd)); readable.push('pushed'); - // we are still not flowing, we will be resuming in the next tick + // We are still not flowing, we will be resuming in the next tick assert.strictEqual(state.flowing, false); // wait for nextTick, so the readableListener flag resets diff --git a/test/parallel/test-stream-unshift-read-race.js b/test/parallel/test-stream-unshift-read-race.js index f2977b285f..69f966e05f 100644 --- a/test/parallel/test-stream-unshift-read-race.js +++ b/test/parallel/test-stream-unshift-read-race.js @@ -106,7 +106,7 @@ r.on('readable', function() { }); w.on('finish', common.mustCall(function() { - // each chunk should start with 1234, and then be asfdasdfasdf... + // Each chunk should start with 1234, and then be asfdasdfasdf... // The first got pulled out before the first unshift('1234'), so it's // lacking that piece. assert.strictEqual(written[0], 'asdfasdfas'); diff --git a/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js b/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js index 86dd7aed1b..ca5d3dfb0f 100644 --- a/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js +++ b/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js @@ -35,7 +35,7 @@ assert.strictEqual(writable._writableState.bufferedRequestCount, 1); process.nextTick(uncork); -// the second chunk is buffered, because we uncork at the end of tick +// The second chunk is buffered, because we uncork at the end of tick writable.write('second chunk'); assert.strictEqual(writable._writableState.corked, 1); assert.strictEqual(writable._writableState.bufferedRequestCount, 2); diff --git a/test/parallel/test-stream2-basic.js b/test/parallel/test-stream2-basic.js index 0083077fc2..f1e4fb02b4 100644 --- a/test/parallel/test-stream2-basic.js +++ b/test/parallel/test-stream2-basic.js @@ -40,7 +40,7 @@ class TestReader extends R { n = Math.max(n, 0); const toRead = Math.min(n, max); if (toRead === 0) { - // simulate the read buffer filling up with some more bytes some time + // Simulate the read buffer filling up with some more bytes some time // in the future. setTimeout(() => { this._pos = 0; diff --git a/test/parallel/test-stream2-push.js b/test/parallel/test-stream2-push.js index 33645df8a5..9d209c18b9 100644 --- a/test/parallel/test-stream2-push.js +++ b/test/parallel/test-stream2-push.js @@ -27,7 +27,7 @@ const { Readable, Writable } = require('stream'); const EE = require('events').EventEmitter; -// a mock thing a bit like the net.Socket/tcp_wrap.handle interaction +// A mock thing a bit like the net.Socket/tcp_wrap.handle interaction const stream = new Readable({ highWaterMark: 16, diff --git a/test/parallel/test-stream2-readable-empty-buffer-no-eof.js b/test/parallel/test-stream2-readable-empty-buffer-no-eof.js index 219a902c71..f1e74ad949 100644 --- a/test/parallel/test-stream2-readable-empty-buffer-no-eof.js +++ b/test/parallel/test-stream2-readable-empty-buffer-no-eof.js @@ -31,7 +31,7 @@ test2(); function test1() { const r = new Readable(); - // should not end when we get a Buffer.alloc(0) or '' as the _read + // Should not end when we get a Buffer.alloc(0) or '' as the _read // result that just means that there is *temporarily* no data, but to // go ahead and try again later. // diff --git a/test/parallel/test-string-decoder-end.js b/test/parallel/test-string-decoder-end.js index c686b19b71..3dd445e6c7 100644 --- a/test/parallel/test-string-decoder-end.js +++ b/test/parallel/test-string-decoder-end.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -// verify that the string decoder works getting 1 byte at a time, +// Verify that the string decoder works getting 1 byte at a time, // the whole buffer at once, and that both match the .toString(enc) // result of the entire buffer. diff --git a/test/parallel/test-string-decoder.js b/test/parallel/test-string-decoder.js index c043795fc6..aaffa131cd 100644 --- a/test/parallel/test-string-decoder.js +++ b/test/parallel/test-string-decoder.js @@ -201,7 +201,7 @@ common.expectsError( } ); -// test verifies that StringDecoder will correctly decode the given input +// Test verifies that StringDecoder will correctly decode the given input // buffer with the given encoding to the expected output. It will attempt all // possible ways to write() the input buffer, see writeSequences(). The // singleSequence allows for easy debugging of a specific sequence which is diff --git a/test/parallel/test-timers-api-refs.js b/test/parallel/test-timers-api-refs.js index c062369444..3c55a05ac4 100644 --- a/test/parallel/test-timers-api-refs.js +++ b/test/parallel/test-timers-api-refs.js @@ -2,7 +2,7 @@ const common = require('../common'); const timers = require('timers'); -// delete global APIs to make sure they're not relied on by the internal timers +// Delete global APIs to make sure they're not relied on by the internal timers // code delete global.setTimeout; delete global.clearTimeout; diff --git a/test/parallel/test-timers-ordering.js b/test/parallel/test-timers-ordering.js index e163ea55bf..1f2809ab4e 100644 --- a/test/parallel/test-timers-ordering.js +++ b/test/parallel/test-timers-ordering.js @@ -38,7 +38,7 @@ function f(i) { assert.strictEqual(i, last_i + 1, `order is broken: ${i} != ${last_i} + 1`); last_i = i; - // check that this iteration is fired at least 1ms later than the previous + // Check that this iteration is fired at least 1ms later than the previous const now = getLibuvNow(); assert(now >= last_ts + 1, `current ts ${now} < prev ts ${last_ts} + 1`); diff --git a/test/parallel/test-tls-securepair-fiftharg.js b/test/parallel/test-tls-securepair-fiftharg.js index 185dc43d94..0651f98c6d 100644 --- a/test/parallel/test-tls-securepair-fiftharg.js +++ b/test/parallel/test-tls-securepair-fiftharg.js @@ -19,7 +19,7 @@ const pair = tls.createSecurePair(sslcontext, true, false, false, { }) }); -// captured traffic from browser's request to https://www.google.com +// Captured traffic from browser's request to https://www.google.com const sslHello = fixtures.readSync('google_ssl_hello.bin'); pair.encrypted.write(sslHello); diff --git a/test/parallel/test-tls-socket-snicallback-without-server.js b/test/parallel/test-tls-socket-snicallback-without-server.js index 9d30bc17b9..3ef28b9570 100644 --- a/test/parallel/test-tls-socket-snicallback-without-server.js +++ b/test/parallel/test-tls-socket-snicallback-without-server.js @@ -20,7 +20,7 @@ new tls.TLSSocket(serverSide, { }) }); -// captured traffic from browser's request to https://www.google.com +// Captured traffic from browser's request to https://www.google.com const sslHello = fixtures.readSync('google_ssl_hello.bin'); clientSide.write(sslHello); diff --git a/test/parallel/test-url-relative.js b/test/parallel/test-url-relative.js index d8532fcfee..6bead6a30d 100644 --- a/test/parallel/test-url-relative.js +++ b/test/parallel/test-url-relative.js @@ -234,7 +234,7 @@ const relativeTests2 = [ // may change to http:///s//a/../../../g ['../../../../g', bases[4], 'http:///g'], - // from Dan Connelly's tests in http://www.w3.org/2000/10/swap/uripath.py + // From Dan Connelly's tests in http://www.w3.org/2000/10/swap/uripath.py ['bar:abc', 'foo:xyz', 'bar:abc'], ['../abc', 'http://example/x/y/z', 'http://example/x/abc'], ['http://example/x/abc', 'http://example2/x/y/z', 'http://example/x/abc'], diff --git a/test/parallel/test-v8-coverage.js b/test/parallel/test-v8-coverage.js index 191835fe0f..69a8286eed 100644 --- a/test/parallel/test-v8-coverage.js +++ b/test/parallel/test-v8-coverage.js @@ -16,7 +16,7 @@ function nextdir() { return `cov_${++dirc}`; } -// outputs coverage when event loop is drained, with no async logic. +// Outputs coverage when event loop is drained, with no async logic. { const coverageDirectory = path.join(tmpdir.path, nextdir()); const output = spawnSync(process.execPath, [ @@ -46,7 +46,7 @@ function nextdir() { assert.strictEqual(fixtureCoverage.functions[1].ranges[1].count, 0); } -// outputs coverage when process.kill(process.pid, "SIGINT"); exits process. +// Outputs coverage when process.kill(process.pid, "SIGINT"); exits process. { const coverageDirectory = path.join(tmpdir.path, nextdir()); const output = spawnSync(process.execPath, [ diff --git a/test/parallel/test-whatwg-encoding-textdecoder.js b/test/parallel/test-whatwg-encoding-textdecoder.js index e1d8575a64..55afd34a02 100644 --- a/test/parallel/test-whatwg-encoding-textdecoder.js +++ b/test/parallel/test-whatwg-encoding-textdecoder.js @@ -177,7 +177,7 @@ function testDecodeSample(encoding, string, bytes) { string); } -// z (ASCII U+007A), cent (Latin-1 U+00A2), CJK water (BMP U+6C34), +// `z` (ASCII U+007A), cent (Latin-1 U+00A2), CJK water (BMP U+6C34), // G-Clef (non-BMP U+1D11E), PUA (BMP U+F8FF), PUA (non-BMP U+10FFFD) // byte-swapped BOM (non-character U+FFFE) const sample = 'z\xA2\u6C34\uD834\uDD1E\uF8FF\uDBFF\uDFFD\uFFFE'; diff --git a/test/parallel/test-zlib-from-concatenated-gzip.js b/test/parallel/test-zlib-from-concatenated-gzip.js index c73a29e649..fea8ab6de2 100644 --- a/test/parallel/test-zlib-from-concatenated-gzip.js +++ b/test/parallel/test-zlib-from-concatenated-gzip.js @@ -39,7 +39,7 @@ zlib.unzip(Buffer.concat([ assert.strictEqual(result.toString(), abc); })); -// files that have the "right" magic bytes for starting a new gzip member +// Files that have the "right" magic bytes for starting a new gzip member // in the middle of themselves, even if they are part of a single // regularly compressed member const pmmFileZlib = fixtures.path('pseudo-multimember-gzip.z'); @@ -59,7 +59,7 @@ fs.createReadStream(pmmFileGz) assert.deepStrictEqual(Buffer.concat(pmmResultBuffers), pmmExpected); })); -// test that the next gzip member can wrap around the input buffer boundary +// Test that the next gzip member can wrap around the input buffer boundary [0, 1, 2, 3, 4, defEncoded.length].forEach((offset) => { const resultBuffers = []; diff --git a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js index 48d9e44142..c9eeb29f93 100644 --- a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js +++ b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js @@ -23,7 +23,7 @@ zlib.gunzip(data, common.mustCall((err, result) => { ); })); -// if the trailing garbage happens to look like a gzip header, it should +// If the trailing garbage happens to look like a gzip header, it should // throw an error. data = Buffer.concat([ zlib.gzipSync('abc'), diff --git a/test/parallel/test-zlib-from-gzip.js b/test/parallel/test-zlib-from-gzip.js index 99c3f1757e..277df3c4cc 100644 --- a/test/parallel/test-zlib-from-gzip.js +++ b/test/parallel/test-zlib-from-gzip.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -// test unzipping a file that was created with a non-node gzip lib, +// Test unzipping a file that was created with a non-node gzip lib, // piped in as fast as possible. const common = require('../common'); diff --git a/test/pummel/test-https-ci-reneg-attack.js b/test/pummel/test-https-ci-reneg-attack.js index 9411d24e07..fad8cd992d 100644 --- a/test/pummel/test-https-ci-reneg-attack.js +++ b/test/pummel/test-https-ci-reneg-attack.js @@ -72,7 +72,7 @@ function test(next) { child.stdout.resume(); child.stderr.resume(); - // count handshakes, start the attack after the initial handshake is done + // Count handshakes, start the attack after the initial handshake is done let handshakes = 0; let renegs = 0; diff --git a/test/pummel/test-timers.js b/test/pummel/test-timers.js index a6766b7a33..6b761f455d 100644 --- a/test/pummel/test-timers.js +++ b/test/pummel/test-timers.js @@ -103,7 +103,7 @@ const interval4 = setInterval(function() { }, 0); -// we should be able to clearTimeout multiple times without breakage. +// We should be able to clearTimeout multiple times without breakage. let expectedTimeouts = 3; function t() { diff --git a/test/pummel/test-tls-ci-reneg-attack.js b/test/pummel/test-tls-ci-reneg-attack.js index 528ebe4516..3509dcfd43 100644 --- a/test/pummel/test-tls-ci-reneg-attack.js +++ b/test/pummel/test-tls-ci-reneg-attack.js @@ -70,7 +70,7 @@ function test(next) { child.stdout.resume(); child.stderr.resume(); - // count handshakes, start the attack after the initial handshake is done + // Count handshakes, start the attack after the initial handshake is done let handshakes = 0; let renegs = 0; diff --git a/test/sequential/test-cli-syntax.js b/test/sequential/test-cli-syntax.js index 35cc78258d..74e8c9fa91 100644 --- a/test/sequential/test-cli-syntax.js +++ b/test/sequential/test-cli-syntax.js @@ -112,7 +112,7 @@ syntaxArgs.forEach(function(args) { assert.strictEqual(c.status, 0); }); -// should throw if code piped from stdin with --check has bad syntax +// Should throw if code piped from stdin with --check has bad syntax // loop each possible option, `-c` or `--check` syntaxArgs.forEach(function(args) { const stdin = 'var foo bar;'; diff --git a/test/sequential/test-http-max-http-headers.js b/test/sequential/test-http-max-http-headers.js index 1dece8beed..64358e8140 100644 --- a/test/sequential/test-http-max-http-headers.js +++ b/test/sequential/test-http-max-http-headers.js @@ -27,8 +27,8 @@ function finished(client, callback) { } function fillHeaders(headers, currentSize, valid = false) { - // llhttp counts actual header name/value sizes, excluding the whitespace and - // stripped chars. + // `llhttp` counts actual header name/value sizes, excluding the whitespace + // and stripped chars. if (getOptionValue('--http-parser') === 'llhttp') { // OK, Content-Length, 0, X-CRASH, aaa... headers += 'a'.repeat(MAX - currentSize); diff --git a/test/sequential/test-init.js b/test/sequential/test-init.js index 1b1b09ee83..a86a1fd045 100644 --- a/test/sequential/test-init.js +++ b/test/sequential/test-init.js @@ -43,7 +43,7 @@ function test(file, expected) { } { - // change CWD as we do this test so it's not dependent on current CWD + // Change CWD as we do this test so it's not dependent on current CWD // being in the test folder process.chdir(__dirname); test('test-init', 'Loaded successfully!'); @@ -57,7 +57,7 @@ function test(file, expected) { } { - // ensures that `node fs` does not mistakenly load the native 'fs' module + // Ensures that `node fs` does not mistakenly load the native 'fs' module // instead of the desired file and that the fs module loads as // expected in node process.chdir(fixtures.path('test-init-native')); diff --git a/test/sequential/test-inspector.js b/test/sequential/test-inspector.js index 00fdb000e9..237b65193f 100644 --- a/test/sequential/test-inspector.js +++ b/test/sequential/test-inspector.js @@ -171,7 +171,7 @@ async function testCommandLineAPI(session) { const printBModulePath = require.resolve('../fixtures/printB.js'); const printBModuleStr = JSON.stringify(printBModulePath); - // we can use `require` outside of a callframe with require in scope + // We can use `require` outside of a callframe with require in scope let result = await session.send( { 'method': 'Runtime.evaluate', 'params': { @@ -182,7 +182,7 @@ async function testCommandLineAPI(session) { checkException(result); assert.strictEqual(result.result.value, true); - // the global require has the same properties as a normal `require` + // The global require has the same properties as a normal `require` result = await session.send( { 'method': 'Runtime.evaluate', 'params': { @@ -273,7 +273,7 @@ async function testCommandLineAPI(session) { parentsEqual: true, parentId: '<inspector console>' }); - // the `require` in the module shadows the command line API's `require` + // The `require` in the module shadows the command line API's `require` result = await session.send( { 'method': 'Debugger.evaluateOnCallFrame', 'params': { |