From 28c7394319bb200bc13d1f64b6da3dd04d81c1a5 Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Sat, 28 Sep 2024 23:58:55 +1000 Subject: [PATCH] test: fix typos PR-URL: https://github.com/nodejs/node/pull/55063 Reviewed-By: Filip Skokan Reviewed-By: Matteo Collina --- test/addons/non-node-context/test-make-buffer.js | 2 +- test/addons/openssl-providers/providers.cjs | 2 +- test/common/report.js | 2 +- test/es-module/test-wasm-web-api.js | 4 ++-- test/fixtures/snapshot/marked.js | 2 +- test/fixtures/test-runner/coverage-loader/hooks.mjs | 2 +- test/fixtures/wpt/FileAPI/support/send-file-form-helper.js | 2 +- .../fixtures/wpt/FileAPI/support/send-file-formdata-helper.js | 2 +- .../events/scrolling/overscroll-event-fired-to-window.html | 2 +- test/fixtures/wpt/dom/events/scrolling/scroll_support.js | 2 +- .../wpt/resource-timing/cached-image-gets-single-entry.html | 2 +- test/fixtures/wpt/resource-timing/initiator-type/link.html | 2 +- test/fixtures/wpt/resources/channel.sub.js | 2 +- test/fixtures/wpt/resources/idlharness.js | 2 +- test/fixtures/wpt/resources/testdriver-actions.js | 2 +- test/fixtures/wpt/resources/testharness.js | 2 +- test/fixtures/wpt/user-timing/measure-exceptions.html | 2 +- test/fixtures/wpt/webmessaging/broadcastchannel/workers.html | 2 +- ...blank-3P-iframe-opens-3P-window.partitioned.tentative.html | 2 +- test/internet/test-uv-threadpool-schedule.js | 2 +- test/js-native-api/test_function/test_function.c | 2 +- test/js-native-api/test_object/test_object.c | 2 +- test/js-native-api/test_reference/test.js | 2 +- test/node-api/test_init_order/test_init_order.cc | 2 +- test/node-api/test_instance_data/test_instance_data.c | 2 +- test/parallel/parallel.status | 2 +- test/parallel/test-blob-file-backed.js | 2 +- test/parallel/test-cli-options-negation.js | 2 +- test/parallel/test-compile-cache-api-tmpdir.js | 2 +- test/parallel/test-crypto-x509.js | 2 +- test/parallel/test-fs-watch-recursive-update-file.js | 2 +- test/parallel/test-inspector-break-when-eval.js | 2 +- test/parallel/test-net-listen-twice.js | 2 +- test/parallel/test-net-pipe-with-long-path.js | 2 +- test/parallel/test-unhandled-exception-with-worker-inuse.js | 2 +- test/parallel/test-url-relative.js | 2 +- test/parallel/test-v8-query-objects.js | 2 +- test/parallel/test-worker-message-port-transfer-duplicate.js | 2 +- test/parallel/test-worker-message-port-wasm-threads.js | 2 +- test/sequential/test-error-serdes.js | 2 +- test/sequential/test-performance-eventloopdelay.js | 2 +- test/sequential/test-worker-eventlooputil.js | 2 +- test/sequential/test-worker-prof.js | 2 +- 43 files changed, 44 insertions(+), 44 deletions(-) diff --git a/test/addons/non-node-context/test-make-buffer.js b/test/addons/non-node-context/test-make-buffer.js index 344ea973d76..26458137b05 100644 --- a/test/addons/non-node-context/test-make-buffer.js +++ b/test/addons/non-node-context/test-make-buffer.js @@ -6,7 +6,7 @@ const { makeBufferInNewContext, } = require(`./build/${common.buildType}/binding`); -// Because the `Buffer` function and its protoype property only (currently) +// Because the `Buffer` function and its prototype property only (currently) // exist in a Node.js instance’s main context, trying to create buffers from // another context throws an exception. assert.throws( diff --git a/test/addons/openssl-providers/providers.cjs b/test/addons/openssl-providers/providers.cjs index 901ea5041ba..2dabbf020e2 100644 --- a/test/addons/openssl-providers/providers.cjs +++ b/test/addons/openssl-providers/providers.cjs @@ -13,7 +13,7 @@ const { getProviders } = require(`./build/${common.buildType}/binding`); // For the providers defined here, the expectation is that the listed ciphers // and hash algorithms are only provided by the named provider. These are for -// basic checks and are not intended to list evey cipher or hash algorithm +// basic checks and are not intended to list every cipher or hash algorithm // supported by the provider. const providers = { 'default': { diff --git a/test/common/report.js b/test/common/report.js index 6e415611865..6fce96590c3 100644 --- a/test/common/report.js +++ b/test/common/report.js @@ -251,7 +251,7 @@ function _validateContent(report, fields = []) { assert(typeof usage.free_memory, 'string'); assert(typeof usage.total_memory, 'string'); assert(typeof usage.available_memory, 'string'); - // This field may not exsit + // This field may not exist if (report.resourceUsage.constrained_memory) { assert(typeof report.resourceUsage.constrained_memory, 'string'); } diff --git a/test/es-module/test-wasm-web-api.js b/test/es-module/test-wasm-web-api.js index d4a81794f80..b199393a18c 100644 --- a/test/es-module/test-wasm-web-api.js +++ b/test/es-module/test-wasm-web-api.js @@ -173,7 +173,7 @@ function testCompileStreamingRejectionUsingFetch(responseCallback, rejection) { "'application/octet-stream'" }); - // HTTP status code indiciating an error. + // HTTP status code indicating an error. await testCompileStreamingRejectionUsingFetch((res) => { res.statusCode = 418; res.setHeader('Content-Type', 'application/wasm'); @@ -184,7 +184,7 @@ function testCompileStreamingRejectionUsingFetch(responseCallback, rejection) { message: /^WebAssembly response has status code 418$/ }); - // HTTP status code indiciating an error, but using a Response whose body is + // HTTP status code indicating an error, but using a Response whose body is // a Buffer instead of calling fetch(). await testCompileStreamingSuccess(() => { return Promise.resolve(new Response(simpleWasmBytes, { diff --git a/test/fixtures/snapshot/marked.js b/test/fixtures/snapshot/marked.js index b72d59461b8..d29b18ba1f9 100644 --- a/test/fixtures/snapshot/marked.js +++ b/test/fixtures/snapshot/marked.js @@ -617,7 +617,7 @@ } else { indent = cap[2].search(/[^ ]/); // Find first non-space char - indent = cap[1].length + (indent > 4 ? 1 : indent); // intented code blocks after 4 spaces; indent is always 1 + indent = cap[1].length + (indent > 4 ? 1 : indent); // indented code blocks after 4 spaces; indent is always 1 itemContents = lines[0].slice(indent - cap[1].length); } diff --git a/test/fixtures/test-runner/coverage-loader/hooks.mjs b/test/fixtures/test-runner/coverage-loader/hooks.mjs index c2e4b1dfc94..57ee712ed97 100644 --- a/test/fixtures/test-runner/coverage-loader/hooks.mjs +++ b/test/fixtures/test-runner/coverage-loader/hooks.mjs @@ -1,5 +1,5 @@ const sources = { -// Virtual file. Dosen't exist on disk +// Virtual file. Doesn't exist on disk "virtual.js": ` import { test } from 'node:test'; test('test', async () => {}); diff --git a/test/fixtures/wpt/FileAPI/support/send-file-form-helper.js b/test/fixtures/wpt/FileAPI/support/send-file-form-helper.js index d6adf21ec33..39c73c41b42 100644 --- a/test/fixtures/wpt/FileAPI/support/send-file-form-helper.js +++ b/test/fixtures/wpt/FileAPI/support/send-file-form-helper.js @@ -180,7 +180,7 @@ const formPostFileUploadTest = ({ // Used to verify that the browser agrees with the test about // field value replacement and encoding independently of file system - // idiosyncracies. + // idiosyncrasies. form.append(Object.assign(document.createElement('input'), { type: 'hidden', name: 'filename', diff --git a/test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js b/test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js index 53c8cca7e09..dd62a0e98e9 100644 --- a/test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js +++ b/test/fixtures/wpt/FileAPI/support/send-file-formdata-helper.js @@ -34,7 +34,7 @@ const formDataPostFileUploadTest = ({ // Used to verify that the browser agrees with the test about // field value replacement and encoding independently of file system - // idiosyncracies. + // idiosyncrasies. formData.append("filename", fileBaseName); // Same, but with name and value reversed to ensure field names diff --git a/test/fixtures/wpt/dom/events/scrolling/overscroll-event-fired-to-window.html b/test/fixtures/wpt/dom/events/scrolling/overscroll-event-fired-to-window.html index ef5ae3daef8..348dadcb4c5 100644 --- a/test/fixtures/wpt/dom/events/scrolling/overscroll-event-fired-to-window.html +++ b/test/fixtures/wpt/dom/events/scrolling/overscroll-event-fired-to-window.html @@ -31,7 +31,7 @@ var window_received_overscroll = false; function onOverscroll(event) { assert_false(event.cancelable); - // overscroll events targetting document are bubbled to the window. + // overscroll events targeting document are bubbled to the window. assert_true(event.bubbles); window_received_overscroll = true; } diff --git a/test/fixtures/wpt/dom/events/scrolling/scroll_support.js b/test/fixtures/wpt/dom/events/scrolling/scroll_support.js index a708364df07..3d7709772ba 100644 --- a/test/fixtures/wpt/dom/events/scrolling/scroll_support.js +++ b/test/fixtures/wpt/dom/events/scrolling/scroll_support.js @@ -88,7 +88,7 @@ const MAX_UNCHANGED_FRAMES = 20; function waitFor(condition, error_message = 'Reaches the maximum frames.') { return new Promise((resolve, reject) => { function tick(frames) { - // We requestAnimationFrame either for MAX_FRAM frames or until condition + // We requestAnimationFrame either for MAX_FRAME frames or until condition // is met. if (frames >= MAX_FRAME) reject(error_message); diff --git a/test/fixtures/wpt/resource-timing/cached-image-gets-single-entry.html b/test/fixtures/wpt/resource-timing/cached-image-gets-single-entry.html index 2d8c4e2e839..bf71615f7b1 100644 --- a/test/fixtures/wpt/resource-timing/cached-image-gets-single-entry.html +++ b/test/fixtures/wpt/resource-timing/cached-image-gets-single-entry.html @@ -14,7 +14,7 @@

Test that a reused resource only appears in the buffer once.