Skip to content

Commit 502781c

Browse files
tniessenMylesBorins
authored andcommitted
test: fix spelling in test case comments
PR-URL: #18018 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
1 parent d149015 commit 502781c

27 files changed

+34
-35
lines changed

test/abort/test-http-parser-consume.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ if (process.argv[2] === 'child') {
1111
const rr = get({ port: server.address().port }, common.mustCall(() => {
1212
// This bad input (0) should abort the parser and the process
1313
rr.parser.consume(0);
14-
// This line should be unreachanble.
14+
// This line should be unreachable.
1515
assert.fail('this should be unreachable');
1616
}));
1717
}));
1818
} else {
19-
// super-proces
19+
// super-process
2020
const child = spawn(process.execPath, [__filename, 'child']);
2121
child.stdout.on('data', common.mustNotCall());
2222

test/fixtures/net-fd-passing-receiver.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ receiver = net.createServer(function(socket) {
2424
});
2525
});
2626

27-
/* To signal the test runne we're up and listening */
27+
/* To signal the test runner we're up and listening */
2828
receiver.on('listening', function() {
2929
console.log('ready');
3030
});

test/parallel/test-buffer-fill.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ Buffer.alloc(8, '');
334334
return 0;
335335
} else {
336336
elseWasLast = true;
337-
// Once buffer.js calls the C++ implemenation of fill, return -1
337+
// Once buffer.js calls the C++ implementation of fill, return -1
338338
return -1;
339339
}
340340
}
@@ -367,7 +367,7 @@ assert.throws(() => {
367367
return 1;
368368
} else {
369369
elseWasLast = true;
370-
// Once buffer.js calls the C++ implemenation of fill, return -1
370+
// Once buffer.js calls the C++ implementation of fill, return -1
371371
return -1;
372372
}
373373
}

test/parallel/test-buffer-includes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ assert.strictEqual(
137137
);
138138

139139

140-
// test usc2 encoding
140+
// test ucs2 encoding
141141
let twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2');
142142

143143
assert(twoByteString.includes('\u0395', 4, 'ucs2'));

test/parallel/test-buffer-indexof.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ assert.strictEqual(511, longBufferString.lastIndexOf(pattern, 1534));
553553
// "yolo swag swag yolo swag yolo yolo swag" ..., goes on for about 5MB.
554554
// This is hard to search because it all looks similar, but never repeats.
555555

556-
// countBits returns the number of bits in the binary reprsentation of n.
556+
// countBits returns the number of bits in the binary representation of n.
557557
function countBits(n) {
558558
let count;
559559
for (count = 0; n > 0; count++) {

test/parallel/test-buffer-read.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ function read(buff, funx, args, expected) {
2020

2121
}
2222

23-
// testing basic functionality of readDoubleBE() and readDOubleLE()
23+
// testing basic functionality of readDoubleBE() and readDoubleLE()
2424
read(buf, 'readDoubleBE', [1], -3.1827727774563287e+295);
2525
read(buf, 'readDoubleLE', [1], -6.966010051009108e+144);
2626

27-
// testing basic functionality of readFLoatBE() and readFloatLE()
27+
// testing basic functionality of readFloatBE() and readFloatLE()
2828
read(buf, 'readFloatBE', [1], -1.6691549692541768e+37);
2929
read(buf, 'readFloatLE', [1], -7861303808);
3030

test/parallel/test-child-process-internal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (process.argv[2] === 'child') {
1111
//send non-internal message containing PREFIX at a non prefix position
1212
process.send(normal);
1313

14-
//send inernal message
14+
//send internal message
1515
process.send(internal);
1616

1717
process.exit(0);

test/parallel/test-crypto-deprecated.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ common.expectWarning('DeprecationWarning', [
1414

1515
// Accessing the deprecated function is enough to trigger the warning event.
1616
// It does not need to be called. So the assert serves the purpose of both
17-
// triggering the warning event and confirming that the deprected function is
17+
// triggering the warning event and confirming that the deprecated function is
1818
// mapped to the correct non-deprecated function.
1919
assert.strictEqual(crypto.Credentials, tls.SecureContext);
2020
assert.strictEqual(crypto.createCredentials, tls.createSecureContext);

test/parallel/test-crypto-fips.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ testHelper(
9191
// to try to call the fips setter, to try to detect this situation, as
9292
// that would throw an error:
9393
// ("Error: Cannot set FIPS mode in a non-FIPS build.").
94-
// Due to this uncertanty the following tests are skipped when configured
94+
// Due to this uncertainty the following tests are skipped when configured
9595
// with --shared-openssl.
9696
if (!sharedOpenSSL()) {
9797
// OpenSSL config file should be able to turn on FIPS mode

test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if (process.argv[2] === 'child') {
2525
// is not properly flushed in V8's Isolate::Throw right before the
2626
// process aborts due to an uncaught exception, and thus the error
2727
// message representing the error that was thrown cannot be read by the
28-
// parent process. So instead of parsing the child process' stdandard
28+
// parent process. So instead of parsing the child process' standard
2929
// error, the parent process will check that in the case
3030
// --abort-on-uncaught-exception was passed, the process did not exit
3131
// with exit code RAN_UNCAUGHT_EXCEPTION_HANDLER_EXIT_CODE.

test/parallel/test-event-emitter-remove-listeners.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ function listener2() {}
9898

9999
// listener4 will still be called although it is removed by listener 3.
100100
ee.emit('hello');
101-
// This is so because the interal listener array at time of emit
101+
// This is so because the internal listener array at time of emit
102102
// was [listener3,listener4]
103103

104-
// Interal listener array [listener3]
104+
// Internal listener array [listener3]
105105
ee.emit('hello');
106106
}
107107

test/parallel/test-fs-access.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ createFileWithPerms(readWriteFile, 0o666);
3737
* The change of user id is done after creating the fixtures files for the same
3838
* reason: the test may be run as the superuser within a directory in which
3939
* only the superuser can create files, and thus it may need superuser
40-
* priviledges to create them.
40+
* privileges to create them.
4141
*
4242
* There's not really any point in resetting the process' user id to 0 after
4343
* changing it to 'nobody', since in the case that the test runs without

test/parallel/test-http-agent-keepalive.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function remoteClose() {
6868
process.nextTick(common.mustCall(() => {
6969
assert.strictEqual(agent.sockets[name], undefined);
7070
assert.strictEqual(agent.freeSockets[name].length, 1);
71-
// waitting remote server close the socket
71+
// waiting remote server close the socket
7272
setTimeout(common.mustCall(() => {
7373
assert.strictEqual(agent.sockets[name], undefined);
7474
assert.strictEqual(agent.freeSockets[name], undefined,
@@ -81,7 +81,7 @@ function remoteClose() {
8181
}
8282

8383
function remoteError() {
84-
// remove server will destroy ths socket
84+
// remote server will destroy the socket
8585
const req = get('/error', common.mustNotCall());
8686
req.on('error', common.mustCall((err) => {
8787
assert(err);

test/parallel/test-http-extra-response.js

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const server = net.createServer(function(socket) {
3030

3131
if (postBody.includes('\r\n')) {
3232
socket.write(fullResponse);
33-
// omg, I wrote the response twice, what a terrible HTTP server I am.
3433
socket.end(fullResponse);
3534
}
3635
});

test/parallel/test-https-agent-secure-protocol.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ server.listen(0, common.mustCall(function() {
4545
}, common.mustCall(function(res) {
4646
res.resume();
4747
globalAgent.once('free', common.mustCall(function() {
48-
// Verify that two keep-alived connections are created
48+
// Verify that two keep-alive connections are created
4949
// due to the different secureProtocol settings:
5050
const keys = Object.keys(globalAgent.freeSockets);
5151
assert.strictEqual(keys.length, 2);

test/parallel/test-https-socket-options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ server_http.listen(0, function() {
4040
});
4141

4242
// Then try https server (requires functions to be
43-
// mirroed in tls.js's CryptoStream)
43+
// mirrored in tls.js's CryptoStream)
4444

4545
const server_https = https.createServer(options, function(req, res) {
4646
console.log('got HTTPS request');

test/parallel/test-net-listen-error.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ const net = require('net');
44

55
const server = net.createServer(function(socket) {
66
});
7-
server.listen(1, '1.1.1.1', common.mustNotCall()); // EACCESS or EADDRNOTAVAIL
7+
server.listen(1, '1.1.1.1', common.mustNotCall()); // EACCES or EADDRNOTAVAIL
88
server.on('error', common.mustCall(function(error) {}));

test/parallel/test-net-pipe-connect-errors.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (common.isWindows) {
1616
emptyTxt = fixtures.path('empty.txt');
1717
} else {
1818
common.refreshTmpDir();
19-
// Keep the file name very short so tht we don't exceed the 108 char limit
19+
// Keep the file name very short so that we don't exceed the 108 char limit
2020
// on CI for a POSIX socket. Even though this isn't actually a socket file,
2121
// the error will be different from the one we are expecting if we exceed the
2222
// limit.

test/parallel/test-os.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ is.string(arch);
9292
assert.ok(arch.length > 0);
9393

9494
if (!common.isSunOS) {
95-
// not implemeneted yet
95+
// not implemented yet
9696
assert.ok(os.loadavg().length > 0);
9797
assert.ok(os.freemem() > 0);
9898
assert.ok(os.totalmem() > 0);

test/parallel/test-promises-unhandled-rejections.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ asyncTest('While inside setImmediate, catching a rejected promise derived ' +
293293
});
294294
});
295295

296-
// State adapation tests
296+
// State adaptation tests
297297
asyncTest('catching a promise which is asynchronously rejected (via ' +
298298
'resolution to an asynchronously-rejected promise) prevents' +
299299
' unhandledRejection', function(done) {

test/parallel/test-readline-interface.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ function isWarned(emitter) {
765765
assert.strictEqual(isWarned(process.stdout._events), false);
766766
}
767767

768-
// can create a new readline Interface with a null output arugument
768+
// can create a new readline Interface with a null output argument
769769
{
770770
const fi = new FakeInput();
771771
const rli = new readline.Interface(

test/parallel/test-repl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ function error_test() {
281281
{ client: client_unix,
282282
send: '/(.)(.)(.)(.)(.)(.)(.)(.)(.)/.test(\'123456789\')\n',
283283
expect: `true\n${prompt_unix}` },
284-
// the following test's result depends on the RegEx's match from the above
284+
// the following test's result depends on the RegExp's match from the above
285285
{ client: client_unix,
286286
send: 'RegExp.$1\nRegExp.$2\nRegExp.$3\nRegExp.$4\nRegExp.$5\n' +
287287
'RegExp.$6\nRegExp.$7\nRegExp.$8\nRegExp.$9\n',

test/parallel/test-stream2-transform.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ const Transform = require('_stream_transform');
154154
}
155155

156156
{
157-
// Verify assymetric transform (expand)
157+
// Verify asymmetric transform (expand)
158158
const pt = new Transform();
159159

160160
// emit each chunk 2 times.
@@ -186,7 +186,7 @@ const Transform = require('_stream_transform');
186186
}
187187

188188
{
189-
// Verify assymetric trasform (compress)
189+
// Verify asymmetric transform (compress)
190190
const pt = new Transform();
191191

192192
// each output is the first char of 3 consecutive chunks,
@@ -241,7 +241,7 @@ const Transform = require('_stream_transform');
241241
// this tests for a stall when data is written to a full stream
242242
// that has empty transforms.
243243
{
244-
// Verify compex transform behavior
244+
// Verify complex transform behavior
245245
let count = 0;
246246
let saved = null;
247247
const pt = new Transform({highWaterMark: 3});

test/parallel/test-stream3-cork-uncork.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ writeChunks(inputChunks, () => {
6565
// trigger writing out the buffer
6666
w.uncork();
6767

68-
// buffered bytes shoud be seen in current tick
68+
// buffered bytes should be seen in current tick
6969
assert.strictEqual(seenChunks.length, 4);
7070

7171
// did the chunks match

test/parallel/test-stringbytes-external.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ assert.strictEqual(c_bin.toString('latin1'), ucs2_control);
6161
assert.strictEqual(c_ucs.toString('latin1'), ucs2_control);
6262

6363

64-
// now let's test BASE64 and HEX ecoding/decoding
64+
// now let's test BASE64 and HEX encoding/decoding
6565
const RADIOS = 2;
6666
const PRE_HALF_APEX = Math.ceil(EXTERN_APEX / 2) - RADIOS;
6767
const PRE_3OF4_APEX = Math.ceil((EXTERN_APEX / 4) * 3) - RADIOS;

test/parallel/test-tls-cnnic-whitelist.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const testCases = [
3131
errorCode: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
3232
},
3333
// Test 1: for the fix of node#2061
34-
// agent6-cert.pem is signed by intermidate cert of ca3.
34+
// agent6-cert.pem is signed by intermediate cert of ca3.
3535
// The server has a cert chain of agent6->ca3->ca1(root) but
3636
// tls.connect should be failed with an error of
3737
// UNABLE_TO_GET_ISSUER_CERT_LOCALLY since the root CA of ca1 is not

test/parallel/test-tls-server-verify.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ function runTest(port, testIndex) {
265265
let renegotiated = false;
266266
const server = tls.Server(serverOptions, function handleConnection(c) {
267267
c.on('error', function(e) {
268-
// child.kill() leads ECONNRESET errro in the TLS connection of
269-
// openssl s_client via spawn(). A Test result is already
268+
// child.kill() leads ECONNRESET error in the TLS connection of
269+
// openssl s_client via spawn(). A test result is already
270270
// checked by the data of client.stdout before child.kill() so
271271
// these tls errors can be ignored.
272272
});

0 commit comments

Comments
 (0)