Skip to content

Commit 9aeba48

Browse files
NathanBaulchtargos
authored andcommitted
test: fix typos
PR-URL: #55063 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 86f7cb8 commit 9aeba48

Some content is hidden

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

42 files changed

+43
-43
lines changed

test/addons/non-node-context/test-make-buffer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const {
66
makeBufferInNewContext,
77
} = require(`./build/${common.buildType}/binding`);
88

9-
// Because the `Buffer` function and its protoype property only (currently)
9+
// Because the `Buffer` function and its prototype property only (currently)
1010
// exist in a Node.js instance’s main context, trying to create buffers from
1111
// another context throws an exception.
1212
assert.throws(

test/addons/openssl-providers/providers.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const { getProviders } = require(`./build/${common.buildType}/binding`);
1313

1414
// For the providers defined here, the expectation is that the listed ciphers
1515
// and hash algorithms are only provided by the named provider. These are for
16-
// basic checks and are not intended to list evey cipher or hash algorithm
16+
// basic checks and are not intended to list every cipher or hash algorithm
1717
// supported by the provider.
1818
const providers = {
1919
'default': {

test/common/report.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ function _validateContent(report, fields = []) {
251251
assert(typeof usage.free_memory, 'string');
252252
assert(typeof usage.total_memory, 'string');
253253
assert(typeof usage.available_memory, 'string');
254-
// This field may not exsit
254+
// This field may not exist
255255
if (report.resourceUsage.constrained_memory) {
256256
assert(typeof report.resourceUsage.constrained_memory, 'string');
257257
}

test/es-module/test-wasm-web-api.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function testCompileStreamingRejectionUsingFetch(responseCallback, rejection) {
173173
"'application/octet-stream'"
174174
});
175175

176-
// HTTP status code indiciating an error.
176+
// HTTP status code indicating an error.
177177
await testCompileStreamingRejectionUsingFetch((res) => {
178178
res.statusCode = 418;
179179
res.setHeader('Content-Type', 'application/wasm');
@@ -184,7 +184,7 @@ function testCompileStreamingRejectionUsingFetch(responseCallback, rejection) {
184184
message: /^WebAssembly response has status code 418$/
185185
});
186186

187-
// HTTP status code indiciating an error, but using a Response whose body is
187+
// HTTP status code indicating an error, but using a Response whose body is
188188
// a Buffer instead of calling fetch().
189189
await testCompileStreamingSuccess(() => {
190190
return Promise.resolve(new Response(simpleWasmBytes, {

test/fixtures/snapshot/marked.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@
617617
} else {
618618
indent = cap[2].search(/[^ ]/); // Find first non-space char
619619

620-
indent = cap[1].length + (indent > 4 ? 1 : indent); // intented code blocks after 4 spaces; indent is always 1
620+
indent = cap[1].length + (indent > 4 ? 1 : indent); // indented code blocks after 4 spaces; indent is always 1
621621

622622
itemContents = lines[0].slice(indent - cap[1].length);
623623
}

test/fixtures/test-runner/coverage-loader/hooks.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const sources = {
2-
// Virtual file. Dosen't exist on disk
2+
// Virtual file. Doesn't exist on disk
33
"virtual.js": `
44
import { test } from 'node:test';
55
test('test', async () => {});

test/fixtures/wpt/FileAPI/support/send-file-form-helper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ const formPostFileUploadTest = ({
180180

181181
// Used to verify that the browser agrees with the test about
182182
// field value replacement and encoding independently of file system
183-
// idiosyncracies.
183+
// idiosyncrasies.
184184
form.append(Object.assign(document.createElement('input'), {
185185
type: 'hidden',
186186
name: 'filename',

test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const formDataPostFileUploadTest = ({
3434

3535
// Used to verify that the browser agrees with the test about
3636
// field value replacement and encoding independently of file system
37-
// idiosyncracies.
37+
// idiosyncrasies.
3838
formData.append("filename", fileBaseName);
3939

4040
// Same, but with name and value reversed to ensure field names

test/fixtures/wpt/dom/events/scrolling/overscroll-event-fired-to-window.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
function onOverscroll(event) {
3333
assert_false(event.cancelable);
34-
// overscroll events targetting document are bubbled to the window.
34+
// overscroll events targeting document are bubbled to the window.
3535
assert_true(event.bubbles);
3636
window_received_overscroll = true;
3737
}

test/fixtures/wpt/dom/events/scrolling/scroll_support.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const MAX_UNCHANGED_FRAMES = 20;
8888
function waitFor(condition, error_message = 'Reaches the maximum frames.') {
8989
return new Promise((resolve, reject) => {
9090
function tick(frames) {
91-
// We requestAnimationFrame either for MAX_FRAM frames or until condition
91+
// We requestAnimationFrame either for MAX_FRAME frames or until condition
9292
// is met.
9393
if (frames >= MAX_FRAME)
9494
reject(error_message);

test/fixtures/wpt/resource-timing/cached-image-gets-single-entry.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1>Description</h1>
1414
<p>Test that a reused resource only appears in the buffer once.</p>
1515
<script>
1616
// Need our own image loading helper because the one in resource-loaders.js
17-
// is desgined to always side-step the HTTP cache but this test relies on the
17+
// is designed to always side-step the HTTP cache but this test relies on the
1818
// second request being resolved from the cache.
1919
const load_image = path => new Promise(resolve => {
2020
const img = document.createElement('img');

test/fixtures/wpt/resource-timing/initiator-type/link.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<script>
2323
initiator_type_test("nested.css", "link", "<link>");
2424

25-
// Verify there are enries for each of nested.css' nested resources.
25+
// Verify there are entries for each of nested.css' nested resources.
2626
initiator_type_test("resource_timing_test0.css?id=n1", "css", "css resources embedded in css");
2727
initiator_type_test("fonts/Ahem.ttf?id=n1", "css", "font resources embedded in css");
2828
initiator_type_test("blue.png?id=n1", "css", "image resources embedded in css");

test/fixtures/wpt/resources/channel.sub.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@
511511
*
512512
* @param {SendChannel|string} [dest] - Either a SendChannel
513513
* to the destination, or the UUID of the destination. If
514-
* ommitted, a new UUID is generated, which can be used when
514+
* omitted, a new UUID is generated, which can be used when
515515
* constructing the URL for the global.
516516
*
517517
*/

test/fixtures/wpt/resources/idlharness.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ IdlArray.prototype.merge_partials = function()
809809
{
810810
// Special-case "Exposed". Must be a subset of original interface's exposure.
811811
// Exposed on a partial is the equivalent of having the same Exposed on all nested members.
812-
// See https://github.com/heycam/webidl/issues/154 for discrepency between Exposed and
812+
// See https://github.com/heycam/webidl/issues/154 for discrepancy between Exposed and
813813
// other extended attributes on partial interfaces.
814814
const exposureAttr = parsed_idl.extAttrs.find(a => a.name === "Exposed");
815815
if (exposureAttr) {

test/fixtures/wpt/resources/testdriver-actions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* await actions.send();
3333
*
3434
* @param {number} [defaultTickDuration] - The default duration of a
35-
* tick. Be default this is set ot 16ms, which is one frame time
35+
* tick. Be default this is set to 16ms, which is one frame time
3636
* based on 60Hz display.
3737
*/
3838
function Actions(defaultTickDuration=16) {

test/fixtures/wpt/resources/testharness.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@
600600

601601
/**
602602
* @callback TestFunction
603-
* @param {Test} test - The test currnetly being run.
603+
* @param {Test} test - The test currently being run.
604604
* @param {Any[]} args - Additional args to pass to function.
605605
*
606606
*/

test/fixtures/wpt/user-timing/measure-exceptions.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
const args = [
3737
51.15, // Verify that number is parsed as string, not number.
38-
"DoesNotExist", // Non-existant mark name should cause error.
38+
"DoesNotExist", // Non-existent mark name should cause error.
3939
];
4040
args.forEach(each => {
4141
test(()=>{

test/fixtures/wpt/webmessaging/broadcastchannel/workers.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
// Since the worker has closed, it's not expected that the
257257
// BroadcastChannel will receive messages (there's a separate test for
258258
// that), so just indicate directly that it's ready to test receiving
259-
// a message from the parent dispite the possibility of a race condition.
259+
// a message from the parent despite the possibility of a race condition.
260260
postMessage('ready');
261261
}
262262
});

test/fixtures/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
for (let id in ids) {
5858
assert_true(id !== undefined, "id is not undefined");
5959
}
60-
// Note: we use assert_true, rather than assert_equals becuase we're
60+
// Note: we use assert_true, rather than assert_equals because we're
6161
// setting random numbers as IDs - this would mean expectations
6262
// files wouldn't work as intended.
6363
assert_true(crossSiteIframeAboutBlankID !== crossSiteIframeID,

test/internet/test-uv-threadpool-schedule.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
// Test to validate massive dns lookups do not block filesytem I/O
3+
// Test to validate massive dns lookups do not block filesystem I/O
44
// (or any fast I/O). Prior to https://github.com/libuv/libuv/pull/1845
55
// few back-to-back dns lookups were sufficient to engage libuv
66
// threadpool workers in a blocking manner, throttling other work items

test/js-native-api/test_function/test_function.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static napi_value TestBadReturnExceptionPending(napi_env env, napi_callback_info
146146
// exception occurs, but we have seen that the C++ wrapper
147147
// with exceptions enabled sometimes returns an invalid value
148148
// when an exception is thrown. Test that we ignore the return
149-
// value then an exeption is pending. We use 0xFFFFFFFF as a value
149+
// value then an exception is pending. We use 0xFFFFFFFF as a value
150150
// that should never be a valid napi_value and node seems to
151151
// crash if it is not ignored indicating that it is indeed invalid.
152152
return (napi_value)(0xFFFFFFFFF);

test/js-native-api/test_object/test_object.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ TypeTaggedInstance(napi_env env, napi_callback_info info) {
656656
return instance;
657657
}
658658

659-
// V8 will not allowe us to construct an external with a NULL data value.
659+
// V8 will not allow us to construct an external with a NULL data value.
660660
#define IN_LIEU_OF_NULL ((void*)0x1)
661661

662662
static napi_value PlainExternal(napi_env env, napi_callback_info info) {

test/js-native-api/test_reference/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ runTests();
142142
// reference (there is a finalizer behind the scenes even
143143
// though it cannot be passed to napi_create_reference).
144144
//
145-
// Since the order is not guarranteed, run the
145+
// Since the order is not guaranteed, run the
146146
// test a number of times maximize the chance that we
147147
// get a run with the desired order for the test.
148148
//

test/node-api/test_init_order/test_init_order.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace {
1212
// In production code developers must avoid dynamic static initializers because
1313
// they affect the start up time. They must prefer static initialization such as
1414
// use of constexpr functions or classes with constexpr constructors. E.g.
15-
// instead of using std::string, it is preferrable to use const char[], or
15+
// instead of using std::string, it is preferable to use const char[], or
1616
// constexpr std::string_view starting with C++17, or even constexpr
1717
// std::string starting with C++20.
1818
struct MyClass {

test/node-api/test_instance_data/test_instance_data.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static void FinalizeThreadsafeFunction(napi_env env, void* raw, void* hint) {
139139
data->tsfn = NULL;
140140
}
141141

142-
// Ths function accepts two arguments: the JS callback, and the finalize
142+
// This function accepts two arguments: the JS callback, and the finalize
143143
// callback. The latter moves the test forward.
144144
static napi_value
145145
TestThreadsafeFunction(napi_env env, napi_callback_info info) {

test/parallel/parallel.status

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test-fs-read-stream-concurrent-reads: PASS, FLAKY
1818

1919
# Until V8 provides a better way to check for flag mismatch without
2020
# making the code cache/snapshot unreproducible, disable the test
21-
# for a preemptive check now. It should idealy fail more gracefully
21+
# for a preemptive check now. It should ideally fail more gracefully
2222
# with a better checking mechanism.
2323
# https://github.com/nodejs/build/issues/3043
2424
test-snapshot-incompatible: SKIP

test/parallel/test-blob-file-backed.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ writeFileSync(testfile5, '');
134134
})().then(common.mustCall());
135135

136136
(async () => {
137-
// We currently do not allow File-backed blobs to be cloned or transfered
137+
// We currently do not allow File-backed blobs to be cloned or transferred
138138
// across worker threads. This is largely because the underlying FdEntry
139139
// is bound to the Environment/Realm under which is was created.
140140
const blob = await openAsBlob(__filename);

test/parallel/test-cli-options-negation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ assert(spawnWithFlags(['--no-max-http-header-size']).stderr.toString().includes(
2121
'a boolean option',
2222
));
2323

24-
// Inexistant flags cannot be negated.
24+
// Inexistent flags cannot be negated.
2525
assert(spawnWithFlags(['--no-i-dont-exist']).stderr.toString().includes(
2626
'bad option: --no-i-dont-exist',
2727
));

test/parallel/test-compile-cache-api-tmpdir.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
// This tests module.enableCompileCache() and module.getCompileCacheDir() work with
4-
// the TMPDIR environemnt variable override.
4+
// the TMPDIR environment variable override.
55

66
require('../common');
77
const { spawnSyncAndAssert } = require('../common/child_process');

test/parallel/test-crypto-x509.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ UcXd/5qu2GhokrKU2cPttU+XAN2Om6a0
366366
// Test date parsing of `validFromDate` and `validToDate` fields, according to RFC 5280.
367367

368368
// Validity dates up until the year 2049 are encoded as UTCTime.
369-
// The fomatting of UTCTime changes from the year ~1949 to 1950~.
369+
// The formatting of UTCTime changes from the year ~1949 to 1950~.
370370
const certPemUTCTime = `-----BEGIN CERTIFICATE-----
371371
MIIE/TCCAuWgAwIBAgIUHbXPaFnjeBehMvdHkXZ+E3a78QswDQYJKoZIhvcNAQEL
372372
BQAwDTELMAkGA1UEBhMCS1IwIBgPMTk0OTEyMjUyMzU5NThaFw01MDAxMDEyMzU5

test/parallel/test-fs-watch-recursive-update-file.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fs.writeFileSync(testFile, 'hello');
3131

3232
const watcher = fs.watch(testDirectory, { recursive: true });
3333
watcher.on('change', common.mustCallAtLeast(function(event, filename) {
34-
// Libuv inconsistenly emits a rename event for the file we are watching
34+
// Libuv inconsistently emits a rename event for the file we are watching
3535
assert.ok(event === 'change' || event === 'rename');
3636

3737
if (filename === path.basename(testFile)) {

test/parallel/test-inspector-break-when-eval.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async function stepOverConsoleStatement(session) {
6666
}
6767

6868
async function runTests() {
69-
// NOTE(mmarchini): Use --inspect-brk to improve avoid undeterministic
69+
// NOTE(mmarchini): Use --inspect-brk to improve avoid indeterministic
7070
// behavior.
7171
const child = new NodeInstance(['--inspect-brk=0'], undefined, script);
7272
const session = await child.connectInspectorSession();

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if (cluster.isPrimary) {
1414
server.listen();
1515
try {
1616
// Currently, we can call `listen` twice in cluster worker,
17-
// if we can not call `listen` twice in the futrue,
17+
// if we can not call `listen` twice in the future,
1818
// just skip this test.
1919
server.listen();
2020
} catch (e) {

test/parallel/test-unhandled-exception-with-worker-inuse.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const common = require('../common');
1010
//
1111
// The root cause of this issue is that before PerIsolateMessageListener()
1212
// is invoked by v8, v8 preserves the JS vm state, although it should
13-
// switch to EXTERNEL. https://bugs.chromium.org/p/v8/issues/detail?id=13464
13+
// switch to EXTERNAL. https://bugs.chromium.org/p/v8/issues/detail?id=13464
1414
//
1515
// Therefore, this commit can be considered as an workaround of the v8 bug,
1616
// but we also find it not useful to call SetIdle() when terminating.

test/parallel/test-url-relative.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ const relativeTests2 = [
346346
'file:///C:/DEV/Haskell/lib/HXmlToolbox-3.01/examples/mini1.xml'],
347347
['../b/c', 'foo:a/y/z', 'foo:a/b/c'],
348348

349-
// changeing auth
349+
// changing auth
350350
['http://diff:auth@www.example.com',
351351
'http://asdf:qwer@www.example.com',
352352
'http://diff:auth@www.example.com/'],

test/parallel/test-v8-query-objects.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ common.expectWarning(
5050
class TestV8QueryObjectsChildClass extends TestV8QueryObjectsBaseClass {}
5151
const summary = v8.queryObjects(TestV8QueryObjectsBaseClass, { format: 'summary' });
5252
// TestV8QueryObjectsChildClass's prototype's [[Prototype]] slot is
53-
// TestV8QueryObjectsBaseClass's prototoype so it shows up in the query.
53+
// TestV8QueryObjectsBaseClass's prototype so it shows up in the query.
5454
assert.deepStrictEqual(summary, [
5555
format(TestV8QueryObjectsChildClass.prototype),
5656
]);

test/parallel/test-worker-message-port-transfer-duplicate.js

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

6-
// Test that passing duplicate transferrables in the transfer list throws
6+
// Test that passing duplicate transferables in the transfer list throws
77
// DataCloneError exceptions.
88

99
{

test/parallel/test-worker-message-port-wasm-threads.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const common = require('../common');
33
const assert = require('assert');
44
const { MessageChannel, Worker } = require('worker_threads');
55

6-
// Test that SharedArrayBuffer instances created from WASM are transferrable
6+
// Test that SharedArrayBuffer instances created from WASM are transferable
77
// through MessageChannels (without crashing).
88

99
const fixtures = require('../common/fixtures');

test/sequential/test-error-serdes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ assert.strictEqual(Object.hasOwn(cycle(errorWithCyclicCause), 'cause'), true);
8383
assert.deepStrictEqual(cycle(new ErrorWithCause('Error with cause')).cause, new Error('err'));
8484
assert.strictEqual(cycle(new ErrorWithThowingCause('Error with cause')).cause, undefined);
8585
assert.strictEqual(Object.hasOwn(cycle(new ErrorWithThowingCause('Error with cause')), 'cause'), false);
86-
// When the cause is cyclic, it is serialized until Maxiumum call stack size is reached
86+
// When the cause is cyclic, it is serialized until Maximum call stack size is reached
8787
let depth = 0;
8888
let e = cycle(new ErrorWithCyclicCause('Error with cause'));
8989
while (e.cause) {

test/sequential/test-performance-eventloopdelay.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,5 @@ const { sleep } = require('internal/util');
101101
}
102102

103103
// Make sure that the histogram instances can be garbage-collected without
104-
// and not just implictly destroyed when the Environment is torn down.
104+
// and not just implicitly destroyed when the Environment is torn down.
105105
process.on('exit', global.gc);

test/sequential/test-worker-eventlooputil.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ let workerELU;
6262
metricsCh.port2.once('message', mustCall(checkWorkerIdle));
6363
metricsCh.port2.postMessage({ cmd: 'elu' });
6464
// Make sure it's still safe to call eventLoopUtilization() after the worker
65-
// hass been closed.
65+
// has been closed.
6666
worker.on('exit', mustCall(() => {
6767
assert.deepStrictEqual(worker.performance.eventLoopUtilization(),
6868
{ idle: 0, active: 0, utilization: 0 });

test/sequential/test-worker-prof.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ if (process.argv[2] === 'child') {
7676
console.log('parent ticks', parentTicks.length);
7777
// When not tracking Worker threads, only 1 or 2 ticks would
7878
// have been recorded.
79-
// prof_sampling_interval is by default 1 millsecond. A higher NODE_TEST_SPIN_MS
79+
// prof_sampling_interval is by default 1 millisecond. A higher NODE_TEST_SPIN_MS
8080
// should result in more ticks, while 15 should be safe on most machines.
8181
assert(workerTicks.length > 15, `worker ticks <= 15:\n${workerTicks.join('\n')}`);
8282
assert(parentTicks.length > 15, `parent ticks <= 15:\n${parentTicks.join('\n')}`);

0 commit comments

Comments
 (0)