Skip to content

Commit 1043b6f

Browse files
tniessenMylesBorins
authored andcommitted
test: fix spelling in test case comments
Backport-PR-URL: #19118 PR-URL: #18018 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
1 parent cbc8561 commit 1043b6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+61
-60
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/async-hooks/hook-checks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require('../common');
1111
* @param {Object} activity including timestamps for each life time event,
1212
* i.e. init, before ...
1313
* @param {Object} hooks the expected life time event invocations with a count
14-
* indicating how oftn they should have been invoked,
14+
* indicating how often they should have been invoked,
1515
* i.e. `{ init: 1, before: 2, after: 2 }`
1616
* @param {String} stage the name of the stage in the test at which we are
1717
* checking the invocations

test/async-hooks/test-internal-nexttick-default-trigger.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const common = require('../common');
44

55
// This tests ensures that the triggerId of both the internal and external
6-
// nexTick function sets the triggerAsyncId correctly.
6+
// nextTick function sets the triggerAsyncId correctly.
77

88
const assert = require('assert');
99
const async_hooks = require('async_hooks');

test/async-hooks/test-pipeconnectwrap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function onlisten() {
5353
const awaitOnconnectCalls = new Set(['server', 'client']);
5454
function maybeOnconnect(source) {
5555
// both server and client must call onconnect. On most OS's waiting for
56-
// the client is sufficient, but on CertOS 5 the sever needs to respond too.
56+
// the client is sufficient, but on CentOS 5 the sever needs to respond too.
5757
assert.ok(awaitOnconnectCalls.size > 0);
5858
awaitOnconnectCalls.delete(source);
5959
if (awaitOnconnectCalls.size > 0) return;

test/async-hooks/verify-graph.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function pruneTickObjects(activities) {
3232
foundTickObject = true;
3333

3434
// point all triggerAsyncIds that point to the tickObject
35-
// to its triggerAsyncId and findally remove it from the activities
35+
// to its triggerAsyncId and finally remove it from the activities
3636
const tickObject = activities[tickObjectIdx];
3737
const newTriggerId = tickObject.triggerAsyncId;
3838
const oldTriggerId = tickObject.uid;

test/common/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ if (process.env.NODE_TEST_WITH_ASYNC_HOOKS) {
8282
const async_wrap = process.binding('async_wrap');
8383

8484
process.on('exit', () => {
85-
// itterate through handles to make sure nothing crashes
85+
// iterate through handles to make sure nothing crashes
8686
for (const k in initHandles)
8787
util.inspect(initHandles[k]);
8888
});

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ receiver = net.createServer(function(socket) {
4545
});
4646
});
4747

48-
/* To signal the test runne we're up and listening */
48+
/* To signal the test runner we're up and listening */
4949
receiver.on('listening', function() {
5050
console.log('ready');
5151
});

test/parallel/test-async-hooks-http-agent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const http = require('http');
88
// Checks that an http.Agent properly asyncReset()s a reused socket handle, and
99
// re-assigns the fresh async id to the reused `net.Socket` instance.
1010

11-
// Make sure a single socket is transpartently reused for 2 requests.
11+
// Make sure a single socket is transparently reused for 2 requests.
1212
const agent = new http.Agent({
1313
keepAlive: true,
1414
keepAliveMsecs: Infinity,

test/parallel/test-async-hooks-promise-enable-disable.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ let p_inits = 0;
1111
common.crashOnUnhandledRejection();
1212

1313
// Not useful to place common.mustCall() around 'exit' event b/c it won't be
14-
// able to check it anway.
14+
// able to check it anyway.
1515
process.on('exit', (code) => {
1616
if (code !== 0)
1717
return;
1818
if (p_er !== null)
1919
throw p_er;
20-
// Expecint exactly 2 PROMISE types to reach init.
20+
// Expecting exactly 2 PROMISE types to reach init.
2121
assert.strictEqual(p_inits, EXPECTED_INITS);
2222
});
2323

test/parallel/test-async-wrap-pop-id-during-load.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if (process.argv[2] === 'async') {
88
throw new Error();
99
}
1010
(async function() { await fn(); })();
11-
// While the above should error, just in case it dosn't the script shouldn't
11+
// While the above should error, just in case it doesn't the script shouldn't
1212
// fork itself indefinitely so return early.
1313
return;
1414
}

test/parallel/test-buffer-fill.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ Buffer.alloc(8, '');
344344
return 0;
345345
} else {
346346
elseWasLast = true;
347-
// Once buffer.js calls the C++ implemenation of fill, return -1
347+
// Once buffer.js calls the C++ implementation of fill, return -1
348348
return -1;
349349
}
350350
}
@@ -377,7 +377,7 @@ assert.throws(() => {
377377
return 1;
378378
} else {
379379
elseWasLast = true;
380-
// Once buffer.js calls the C++ implemenation of fill, return -1
380+
// Once buffer.js calls the C++ implementation of fill, return -1
381381
return -1;
382382
}
383383
}

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
@@ -32,7 +32,7 @@ if (process.argv[2] === 'child') {
3232
//send non-internal message containing PREFIX at a non prefix position
3333
process.send(normal);
3434

35-
//send inernal message
35+
//send internal message
3636
process.send(internal);
3737

3838
process.exit(0);

test/parallel/test-child-process-send-returns-boolean.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const fixtures = require('../common/fixtures');
1414
const subScript = fixtures.path('child-process-persistent.js');
1515

1616
{
17-
// Test `send` return value on `fork` that opens and IPC by deafult.
17+
// Test `send` return value on `fork` that opens and IPC by default.
1818
const n = fork(subScript);
1919
// `subprocess.send` should always return `true` for the first send.
2020
const rv = n.send({ h: 'w' }, (err) => { if (err) assert.fail(err); });
@@ -31,12 +31,12 @@ const subScript = fixtures.path('child-process-persistent.js');
3131
const server = net.createServer(common.mustNotCall()).listen(0, () => {
3232
const handle = server._handle;
3333

34-
// Sending a handle and not giving the tickQueue time to acknoladge should
34+
// Sending a handle and not giving the tickQueue time to acknowledge should
3535
// create the internal backlog, but leave it empty.
3636
const rv1 = s.send('one', handle, (err) => { if (err) assert.fail(err); });
3737
assert.strictEqual(rv1, true);
38-
// Since the first `send` included a handle (should be unackoladged),
39-
// we can safly queue up only one more message.
38+
// Since the first `send` included a handle (should be unacknowledged),
39+
// we can safely queue up only one more message.
4040
const rv2 = s.send('two', (err) => { if (err) assert.fail(err); });
4141
assert.strictEqual(rv2, true);
4242
// The backlog should now be indicate to backoff.

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
@@ -119,10 +119,10 @@ function listener2() {}
119119

120120
// listener4 will still be called although it is removed by listener 3.
121121
ee.emit('hello');
122-
// This is so because the interal listener array at time of emit
122+
// This is so because the internal listener array at time of emit
123123
// was [listener3,listener4]
124124

125-
// Interal listener array [listener3]
125+
// Internal listener array [listener3]
126126
ee.emit('hello');
127127
}
128128

test/parallel/test-fs-access.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ createFileWithPerms(readWriteFile, 0o666);
2828
* The change of user id is done after creating the fixtures files for the same
2929
* reason: the test may be run as the superuser within a directory in which
3030
* only the superuser can create files, and thus it may need superuser
31-
* priviledges to create them.
31+
* privileges to create them.
3232
*
3333
* There's not really any point in resetting the process' user id to 0 after
3434
* 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
@@ -89,7 +89,7 @@ function remoteClose() {
8989
process.nextTick(common.mustCall(() => {
9090
assert.strictEqual(agent.sockets[name], undefined);
9191
assert.strictEqual(agent.freeSockets[name].length, 1);
92-
// waitting remote server close the socket
92+
// waiting remote server close the socket
9393
setTimeout(common.mustCall(() => {
9494
assert.strictEqual(agent.sockets[name], undefined);
9595
assert.strictEqual(agent.freeSockets[name], undefined,
@@ -102,7 +102,7 @@ function remoteClose() {
102102
}
103103

104104
function remoteError() {
105-
// remove server will destroy ths socket
105+
// remote server will destroy the socket
106106
const req = get('/error', common.mustNotCall());
107107
req.on('error', common.mustCall((err) => {
108108
assert(err);

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

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

5252
if (postBody.includes('\r\n')) {
5353
socket.write(fullResponse);
54-
// omg, I wrote the response twice, what a terrible HTTP server I am.
5554
socket.end(fullResponse);
5655
}
5756
});

test/parallel/test-http2-server-push-disabled.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ server.listen(0, common.mustCall(() => {
4242
options);
4343
const req = client.request({ ':path': '/' });
4444

45-
// Because push stream sre disabled, this must not be called.
45+
// Because push streams are disabled, this must not be called.
4646
client.on('stream', common.mustNotCall());
4747

4848
req.resume();

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

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ server_http.listen(0, function() {
6161
});
6262

6363
// Then try https server (requires functions to be
64-
// mirroed in tls.js's CryptoStream)
64+
// mirrored in tls.js's CryptoStream)
6565

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

test/parallel/test-internal-fs-syncwritestream.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const filename = path.join(common.tmpDir, 'sync-write-stream.txt');
3131
assert.strictEqual(stream.listenerCount('end'), 1);
3232
}
3333

34-
// Verfiy that the file will be written synchronously.
34+
// Verify that the file will be written synchronously.
3535
{
3636
const fd = fs.openSync(filename, 'w');
3737
const stream = new SyncWriteStream(fd);
@@ -54,7 +54,7 @@ const filename = path.join(common.tmpDir, 'sync-write-stream.txt');
5454
assert.strictEqual(stream.destroySoon(), true);
5555
}
5656

57-
// Verfit that the 'end' event listener will also destroy the stream.
57+
// Verify that the 'end' event listener will also destroy the stream.
5858
{
5959
const fd = fs.openSync(filename, 'w');
6060
const stream = new SyncWriteStream(fd);

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

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

2626
const server = net.createServer(function(socket) {
2727
});
28-
server.listen(1, '1.1.1.1', common.mustNotCall()); // EACCESS or EADDRNOTAVAIL
28+
server.listen(1, '1.1.1.1', common.mustNotCall()); // EACCES or EADDRNOTAVAIL
2929
server.on('error', common.mustCall());

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

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

test/parallel/test-net-write-after-close.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const server = net.createServer(common.mustCall(function(socket) {
3939

4040
server.listen(0, function() {
4141
const client = net.connect(this.address().port, function() {
42-
// cliend.end() will close both the readable and writable side
42+
// client.end() will close both the readable and writable side
4343
// of the duplex because allowHalfOpen defaults to false.
4444
// Then 'end' will be emitted when it receives a FIN packet from
4545
// the other side.

test/parallel/test-os.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ is.string(arch);
113113
assert.ok(arch.length > 0);
114114

115115
if (!common.isSunOS) {
116-
// not implemeneted yet
116+
// not implemented yet
117117
assert.ok(os.loadavg().length > 0);
118118
assert.ok(os.freemem() > 0);
119119
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
@@ -812,7 +812,7 @@ function isWarned(emitter) {
812812
assert.strictEqual(isWarned(process.stdout._events), false);
813813
}
814814

815-
// can create a new readline Interface with a null output arugument
815+
// can create a new readline Interface with a null output argument
816816
{
817817
const fi = new FakeInput();
818818
const rli = new readline.Interface(

test/parallel/test-repl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ function error_test() {
304304
{ client: client_unix,
305305
send: '/(.)(.)(.)(.)(.)(.)(.)(.)(.)/.test(\'123456789\')\n',
306306
expect: `true\n${prompt_unix}` },
307-
// the following test's result depends on the RegEx's match from the above
307+
// the following test's result depends on the RegExp's match from the above
308308
{ client: client_unix,
309309
send: 'RegExp.$1\nRegExp.$2\nRegExp.$3\nRegExp.$4\nRegExp.$5\n' +
310310
'RegExp.$6\nRegExp.$7\nRegExp.$8\nRegExp.$9\n',

test/parallel/test-require-symlink.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ function copyDir(source, target) {
3838
copyDir(fixtureSource, tmpDirTarget);
3939

4040
// Move to tmp dir and do everything with relative paths there so that the test
41-
// doesn't incorrectly fail due to a symlink somewhere else in the absolte path.
41+
// doesn't incorrectly fail due to a symlink somewhere else in the absolute
42+
// path.
4243
process.chdir(common.tmpDir);
4344

4445
const linkDir = path.join(dirName,

test/parallel/test-stream-transform-final-sync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let state = 0;
77

88
/*
99
What you do
10-
var stream = new tream.Transform({
10+
var stream = new stream.Transform({
1111
transform: function transformCallback(chunk, _, next) {
1212
// part 1
1313
this.push(chunk);

test/parallel/test-stream-transform-final.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let state = 0;
77

88
/*
99
What you do
10-
var stream = new tream.Transform({
10+
var stream = new stream.Transform({
1111
transform: function transformCallback(chunk, _, next) {
1212
// part 1
1313
this.push(chunk);

0 commit comments

Comments
 (0)