From 28b4469e690d9c006a328b67f275362842a995f3 Mon Sep 17 00:00:00 2001 From: co63oc Date: Thu, 27 Feb 2025 16:06:11 +0800 Subject: [PATCH] chore: Fix typos (#15527) --- e2e/__tests__/multiProjectRunner.test.ts | 2 +- e2e/__tests__/runtimeInternalModuleRegistry.test.ts | 2 +- e2e/__tests__/testFailingSnapshot.test.js | 2 +- packages/diff-sequences/src/__tests__/index.test.ts | 4 ++-- packages/diff-sequences/src/index.ts | 2 +- .../src/__tests__/__snapshots__/hooks.test.ts.snap | 2 +- packages/jest-circus/src/__tests__/hooks.test.ts | 2 +- packages/jest-resolve/src/__tests__/resolve.test.ts | 2 +- .../jest-runtime/src/__tests__/runtime_require_module.test.js | 2 +- packages/jest-snapshot/src/State.ts | 2 +- packages/jest-snapshot/src/index.ts | 2 +- packages/jest-types/src/Circus.ts | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/e2e/__tests__/multiProjectRunner.test.ts b/e2e/__tests__/multiProjectRunner.test.ts index 0ec2750c5959..60122cdbb7f5 100644 --- a/e2e/__tests__/multiProjectRunner.test.ts +++ b/e2e/__tests__/multiProjectRunner.test.ts @@ -360,7 +360,7 @@ test('resolves projects and their properly', () => { 'project2/project2.conf.json': JSON.stringify({ id: 'project2', rootDir: '../', // root dir is set to the top level - setupFiles: ['/project2/project2_setup.js'], // rootDir shold be of the + setupFiles: ['/project2/project2_setup.js'], // rootDir should be of the testEnvironment: 'node', testPathIgnorePatterns: ['project1'], }), diff --git a/e2e/__tests__/runtimeInternalModuleRegistry.test.ts b/e2e/__tests__/runtimeInternalModuleRegistry.test.ts index e6faf61610e4..7379b87fc049 100644 --- a/e2e/__tests__/runtimeInternalModuleRegistry.test.ts +++ b/e2e/__tests__/runtimeInternalModuleRegistry.test.ts @@ -14,7 +14,7 @@ describe('Runtime Internal Module Registry', () => { // used. // // This test verifies that that behavior doesn't happen anymore, and correctly - // uses two module registries: an internal registry that's used specificly by + // uses two module registries: an internal registry that's used specifically by // Jest to require any internal modules used when setting up the test // environment, and a "normal" module registry that's used by the actual test // code (and can safely be cleared after every test) diff --git a/e2e/__tests__/testFailingSnapshot.test.js b/e2e/__tests__/testFailingSnapshot.test.js index 70c61c191416..d8c715f9548f 100644 --- a/e2e/__tests__/testFailingSnapshot.test.js +++ b/e2e/__tests__/testFailingSnapshot.test.js @@ -18,7 +18,7 @@ describe('test.failing', () => { expect('0').toMatchSnapshot(); }); - test.failing('snapshot doesnt exist', () => { + test.failing("snapshot doesn't exist", () => { expect('0').toMatchSnapshot(); }); diff --git a/packages/diff-sequences/src/__tests__/index.test.ts b/packages/diff-sequences/src/__tests__/index.test.ts index 4c951a4bc697..38e5f05e4ca3 100644 --- a/packages/diff-sequences/src/__tests__/index.test.ts +++ b/packages/diff-sequences/src/__tests__/index.test.ts @@ -573,9 +573,9 @@ describe('all common items inside recursive', () => { // depth 1 common items do not follow prev nor last forward segment when d === 8 // depth 2 preceding common item follows prev forward segment when d === 4 // depth 2 following transposed again so unswap swapped args - // depth 2 following common items do not follow prev nor last foward segment when d === 4 + // depth 2 following common items do not follow prev nor last forward segment when d === 4 // depth 3 preceding common item follows last forward segment when d === 2 - // depth 3 following rransposed again so swap args again + // depth 3 following transposed again so swap args again // depth 3 following common item follows last forward segment when d === 2 const a = [ 'delete1_depth2_preceding_prevF', diff --git a/packages/diff-sequences/src/index.ts b/packages/diff-sequences/src/index.ts index fe3c81f88c5a..6144781c3acb 100644 --- a/packages/diff-sequences/src/index.ts +++ b/packages/diff-sequences/src/index.ts @@ -34,7 +34,7 @@ // Forward diagonals kF: // zero diagonal intersects top left corner // positive diagonals intersect top edge -// negative diagonals insersect left edge +// negative diagonals intersect left edge // // Reverse diagonals kR: // zero diagonal intersects bottom right corner diff --git a/packages/jest-circus/src/__tests__/__snapshots__/hooks.test.ts.snap b/packages/jest-circus/src/__tests__/__snapshots__/hooks.test.ts.snap index 277e3c17e2f7..0ab7a716d401 100644 --- a/packages/jest-circus/src/__tests__/__snapshots__/hooks.test.ts.snap +++ b/packages/jest-circus/src/__tests__/__snapshots__/hooks.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`beforeAll is exectued correctly 1`] = ` +exports[`beforeAll is executed correctly 1`] = ` "start_describe_definition: describe 1 add_hook: beforeAll add_test: test 1 diff --git a/packages/jest-circus/src/__tests__/hooks.test.ts b/packages/jest-circus/src/__tests__/hooks.test.ts index 0db8d2f53d50..56dfd8f71b83 100644 --- a/packages/jest-circus/src/__tests__/hooks.test.ts +++ b/packages/jest-circus/src/__tests__/hooks.test.ts @@ -55,7 +55,7 @@ test('multiple before each hooks in one describe are executed in the right order expect(stdout).toMatchSnapshot(); }); -test('beforeAll is exectued correctly', () => { +test('beforeAll is executed correctly', () => { const {stdout} = runTest(` describe('describe 1', () => { beforeAll(() => console.log('> beforeAll 1')); diff --git a/packages/jest-resolve/src/__tests__/resolve.test.ts b/packages/jest-resolve/src/__tests__/resolve.test.ts index 321796e71242..0228a53f6243 100644 --- a/packages/jest-resolve/src/__tests__/resolve.test.ts +++ b/packages/jest-resolve/src/__tests__/resolve.test.ts @@ -768,7 +768,7 @@ describe('nodeModulesPaths', () => { expect(result.at(-1)).toBe('./customFolder'); }); - it('provides custom module multy paths after node_modules', () => { + it('provides custom module multi paths after node_modules', () => { const src = require.resolve('../'); const result = nodeModulesPaths(src, { paths: ['./customFolder', './customFolder2', './customFolder3'], diff --git a/packages/jest-runtime/src/__tests__/runtime_require_module.test.js b/packages/jest-runtime/src/__tests__/runtime_require_module.test.js index c72a643b577e..3889231b5f09 100644 --- a/packages/jest-runtime/src/__tests__/runtime_require_module.test.js +++ b/packages/jest-runtime/src/__tests__/runtime_require_module.test.js @@ -235,7 +235,7 @@ describe('Runtime requireModule', () => { expect(exports1).toBe(exports2); }); - it('provides manual mock when real module doesnt exist', async () => { + it("provides manual mock when real module doesn't exist", async () => { const runtime = await createRuntime(__filename); const exports = runtime.requireModule( runtime.__mockRootPath, diff --git a/packages/jest-snapshot/src/State.ts b/packages/jest-snapshot/src/State.ts index 6ed107b0fc2a..265237742321 100644 --- a/packages/jest-snapshot/src/State.ts +++ b/packages/jest-snapshot/src/State.ts @@ -255,7 +255,7 @@ export default class SnapshotState { // These are the conditions on when to write snapshots: // * There's no snapshot file in a non-CI environment. // * There is a snapshot file and we decided to update the snapshot. - // * There is a snapshot file, but it doesn't have this snaphsot. + // * There is a snapshot file, but it doesn't have this snapshot. // These are the conditions on when not to write snapshots: // * The update flag is set to 'none'. // * There's no snapshot file or a file without this snapshot on a CI environment. diff --git a/packages/jest-snapshot/src/index.ts b/packages/jest-snapshot/src/index.ts index 5cd1f757303c..c7361b251136 100644 --- a/packages/jest-snapshot/src/index.ts +++ b/packages/jest-snapshot/src/index.ts @@ -283,7 +283,7 @@ const _toMatchSnapshot = (config: MatchSnapshotConfig) => { const {testFailing = false} = context; if (!testFailing && context.dontThrow) { - // Supress errors while running tests + // Suppress errors while running tests context.dontThrow(); } diff --git a/packages/jest-types/src/Circus.ts b/packages/jest-types/src/Circus.ts index dbd87e6f8780..46c86aef9eec 100644 --- a/packages/jest-types/src/Circus.ts +++ b/packages/jest-types/src/Circus.ts @@ -156,7 +156,7 @@ export type AsyncEvent = // test failure is defined by presence of errors in `test.errors`, // `test_done` indicates that the test and all its hooks were run, // and nothing else will change it's state in the future. (except third - // party extentions/plugins) + // party extensions/plugins) name: 'test_done'; test: TestEntry; }