Skip to content

Commit

Permalink
test: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanBaulch committed Sep 22, 2024
1 parent eda9872 commit bd182e6
Show file tree
Hide file tree
Showing 72 changed files with 275 additions and 275 deletions.
2 changes: 1 addition & 1 deletion test/addons/non-node-context/test-make-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion test/addons/openssl-providers/providers.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const buildType = process.config.target_defaults ?

// If env var is set then enable async_hook hooks for all tests.
if (process.env.NODE_TEST_WITH_ASYNC_HOOKS) {
const destroydIdsList = {};
const destroyIdsList = {};
const destroyListList = {};
const initHandles = {};
const { internalBinding } = require('internal/test/binding');
Expand Down Expand Up @@ -210,12 +210,12 @@ if (process.env.NODE_TEST_WITH_ASYNC_HOOKS) {
before() { },
after() { },
destroy(id) {
if (destroydIdsList[id] !== undefined) {
process._rawDebug(destroydIdsList[id]);
if (destroyIdsList[id] !== undefined) {
process._rawDebug(destroyIdsList[id]);
process._rawDebug();
throw new Error(`destroy called for same id (${id})`);
}
destroydIdsList[id] = inspect(new Error());
destroyIdsList[id] = inspect(new Error());
},
}).enable();
}
Expand Down
2 changes: 1 addition & 1 deletion test/common/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-typescript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ test('execute a TypeScript file with type definition but no type keyword', async
strictEqual(result.code, 1);
});

test('execute a TypeScript file with type definition but no type keyword with default-type modue', async () => {
test('execute a TypeScript file with type definition but no type keyword with default-type module', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-strip-types',
'--experimental-default-type=module',
Expand Down
4 changes: 2 additions & 2 deletions test/es-module/test-wasm-web-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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, {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/dotenv/basic-valid.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BASIC=overriden
BASIC=overridden
8 changes: 4 additions & 4 deletions test/fixtures/guess-hash-seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function time_set_lookup(set, value) {
// Set with 256 buckets; bucket 0 full, others empty
const tester_set_buckets = 256;
const tester_set = new Set();
let tester_set_treshold;
let tester_set_threshold;
(function() {
// fill bucket 0 and find extra numbers mapping to bucket 0 and a different
// bucket `capacity == numBuckets * 2`
Expand Down Expand Up @@ -114,9 +114,9 @@ let tester_set_treshold;
const neg_time =
Math.min(...run_repeated(10000, time_set_lookup.bind(null, tester_set,
negative_test_value)));
tester_set_treshold = (pos_time + neg_time) / 2;
tester_set_threshold = (pos_time + neg_time) / 2;
// console.log(`pos_time: ${pos_time}, neg_time: ${neg_time},`,
// `threshold: ${tester_set_treshold}`);
// `threshold: ${tester_set_threshold}`);
})();

// determine hash seed
Expand All @@ -126,7 +126,7 @@ const slow_str_gen = (function*() {
while (1) {
const str = `#${strgen_i++}`;
for (let i = 0; i < 1000; i++) {
if (time_set_lookup(tester_set, str) < tester_set_treshold)
if (time_set_lookup(tester_set, str) < tester_set_threshold)
continue outer;
}
yield str;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/fixtures/postject-copy/node_modules/postject/dist/api.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions test/fixtures/snapshot/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -2177,19 +2177,19 @@

_proto.getNextSafeSlug = function getNextSafeSlug(originalSlug, isDryRun) {
var slug = originalSlug;
var occurenceAccumulator = 0;
var occurrenceAccumulator = 0;

if (this.seen.hasOwnProperty(slug)) {
occurenceAccumulator = this.seen[originalSlug];
occurrenceAccumulator = this.seen[originalSlug];

do {
occurenceAccumulator++;
slug = originalSlug + '-' + occurenceAccumulator;
occurrenceAccumulator++;
slug = originalSlug + '-' + occurrenceAccumulator;
} while (this.seen.hasOwnProperty(slug));
}

if (!isDryRun) {
this.seen[originalSlug] = occurenceAccumulator;
this.seen[originalSlug] = occurrenceAccumulator;
this.seen[slug] = 0;
}

Expand Down
Loading

0 comments on commit bd182e6

Please sign in to comment.