Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: restore non-comment typos
  • Loading branch information
NathanBaulch committed Sep 24, 2024
commit 45ca0fd106d89f686d37e9b18357f569e7aaa61d
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 destroyIdsList = {};
const destroydIdsList = {};
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 (destroyIdsList[id] !== undefined) {
process._rawDebug(destroyIdsList[id]);
if (destroydIdsList[id] !== undefined) {
process._rawDebug(destroydIdsList[id]);
process._rawDebug();
throw new Error(`destroy called for same id (${id})`);
}
destroyIdsList[id] = inspect(new Error());
destroydIdsList[id] = inspect(new Error());
},
}).enable();
}
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 module', async () => {
test('execute a TypeScript file with type definition but no type keyword with default-type modue', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-strip-types',
'--experimental-default-type=module',
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=overridden
BASIC=overriden
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_threshold;
let tester_set_treshold;
(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_threshold;
const neg_time =
Math.min(...run_repeated(10000, time_set_lookup.bind(null, tester_set,
negative_test_value)));
tester_set_threshold = (pos_time + neg_time) / 2;
tester_set_treshold = (pos_time + neg_time) / 2;
// console.log(`pos_time: ${pos_time}, neg_time: ${neg_time},`,
// `threshold: ${tester_set_threshold}`);
// `threshold: ${tester_set_treshold}`);
})();

// 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_threshold)
if (time_set_lookup(tester_set, str) < tester_set_treshold)
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.

10 changes: 5 additions & 5 deletions test/fixtures/snapshot/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -2177,19 +2177,19 @@

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

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

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

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

Expand Down
Loading