Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some minor (language, not code) syntax and type errors. #14352

Merged
merged 1 commit into from
Mar 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/jest-light-runner/src/worker-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { performance } from "perf_hooks";
import snapshot from "jest-snapshot";
import expect from "expect";
import * as circus from "jest-circus";
import { inspect } from "util"
import { inspect } from "util";

import "./global-setup.js";

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

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

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

// Get suppressed errors from ``jest-matchers`` that weren't throw during
// Get suppressed errors from ``jest-matchers`` that weren't thrown during
// test execution and add them to the test result, potentially failing
// a passing test.
const { suppressedErrors } = expect.getState();
Expand Down
3 changes: 1 addition & 2 deletions test/runtime-integration/bundlers.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ function test(name, command, directory, output, first) {
});

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

if (expected === out) {
console.log("OK");
} else if (first && process.env.OVERWRITE) {
fs.writeFileSync(expectedPath, out);
expected = out;
console.log("UPDATED");
} else {
console.error("FAILED\n");
Expand Down
2 changes: 1 addition & 1 deletion test/runtime-integration/node.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (

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

const expectedCjs =
Expand Down