Skip to content

Commit 4820ea0

Browse files
authored
Fix some minor (language, not code) syntax and type errors. (#14352)
Co-authored-by: gaosheng08 <gaosheng08@meituan.com>
1 parent a7b1181 commit 4820ea0

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

test/jest-light-runner/src/worker-runner.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import { inspect } from "util";
88

99
import "./global-setup.js";
1010

11-
/** @typedef {{ failures: number, passses: number, pending: number, start: number, end: number }} Stats */
12-
/** @typedef {{ ancestors: string[], title: string, errors: Error[], skipped: boolean }} InternalTestResult */
11+
/** @typedef {{ failures: number, passes: number, pending: number, start: number, end: number }} Stats */
12+
/** @typedef {{ ancestors: string[], title: string, duration: number, errors: Error[], skipped: boolean }} InternalTestResult */
1313

14-
// Node.js workers (worker_therads) don't support
14+
// Node.js workers (worker_threads) don't support
1515
// process.chdir, that we use multiple times in our tests.
1616
// We can "polyfill" it for process.cwd() usage, but it
1717
// won't affect path.* and fs.* functions.
@@ -53,7 +53,7 @@ export default async function ({
5353
stats.end = performance.now();
5454

5555
snapshotState._inlineSnapshots.forEach(({ frame }) => {
56-
// When using native ESM, errors have an URL location.
56+
// When using native ESM, errors have a URL location.
5757
// Jest expects paths.
5858
frame.file = fileURLToPath(frame.file);
5959
});
@@ -140,7 +140,7 @@ async function runTest(fn, stats, results, ancestors, name) {
140140
errors.push(error);
141141
});
142142

143-
// Get suppressed errors from ``jest-matchers`` that weren't throw during
143+
// Get suppressed errors from ``jest-matchers`` that weren't thrown during
144144
// test execution and add them to the test result, potentially failing
145145
// a passing test.
146146
const { suppressedErrors } = expect.getState();

test/runtime-integration/bundlers.cjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,12 @@ function test(name, command, directory, output, first) {
3333
});
3434

3535
const expectedPath = path.join(__dirname, "expected-bundler.txt");
36-
let expected = fs.readFileSync(expectedPath, "utf8");
36+
const expected = fs.readFileSync(expectedPath, "utf8");
3737

3838
if (expected === out) {
3939
console.log("OK");
4040
} else if (first && process.env.OVERWRITE) {
4141
fs.writeFileSync(expectedPath, out);
42-
expected = out;
4342
console.log("UPDATED");
4443
} else {
4544
console.error("FAILED\n");

test/runtime-integration/node.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if (
1818

1919
test("ESM", "./src/main-esm.mjs", expectedEsm);
2020
// TODO: This never worked in any Babel version
21-
// test("ESM - absoluteRuntime", "--esperimental-modules ./src/absolute/main-esm.mjs", "expected-esm-absolute.txt");
21+
// test("ESM - absoluteRuntime", "--experimental-modules ./src/absolute/main-esm.mjs", "expected-esm-absolute.txt");
2222
}
2323

2424
const expectedCjs =

0 commit comments

Comments
 (0)