Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion e2e/__tests__/__snapshots__/jest.config.ts.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`on node >=24 invalid JS in jest.config.ts (node with native TS support) 1`] = `
"Error: Jest: Failed to parse the TypeScript config file <<REPLACED>>
Expand Down Expand Up @@ -54,6 +54,19 @@ Time: <<REPLACED>>
Ran all test suites."
`;

exports[`works with jest.config.ts with cjs contents 1`] = `
"PASS __tests__/a-giraffe.js
✓ giraffe"
`;

exports[`works with jest.config.ts with cjs contents 2`] = `
"Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites."
`;

exports[`works with tsconfig.json 1`] = `
"PASS __tests__/a-giraffe.js
✓ giraffe"
Expand Down
17 changes: 17 additions & 0 deletions e2e/__tests__/jest.config.ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,23 @@
expect(summary).toMatchSnapshot();
});

test('falls back to a loader if we encounter a ESM TS config file in a CommonJs project', () => {
writeFiles(DIR, {
'__tests__/a-giraffe.js': "test('giraffe', () => expect(1).toBe(1));",
'jest.config.ts':
"export default {testEnvironment: 'jest-environment-node', testRegex: '.*-giraffe.js'};",
'package.json': '{"type":"commonjs"}',
});

const {stderr, exitCode} = runJest(DIR, ['-w=1', '--ci=false'], {
nodeOptions: '--no-warnings',
});
const {rest, summary} = extractSummary(stderr);
expect(exitCode).toBe(0);
expect(rest).toMatchSnapshot();

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Node LTS on Ubuntu with coverage (1/4)

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Node LTS on Ubuntu with coverage (1/4)

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Node LTS on Ubuntu with coverage (1/4)

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)

Check failure on line 49 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 1` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "PASS __tests__/a-giraffe.js ✓ giraffe" at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:49:16)
expect(summary).toMatchSnapshot();

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Node LTS on Ubuntu with coverage (1/4)

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Node LTS on Ubuntu with coverage (1/4)

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Node LTS on Ubuntu with coverage (1/4)

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Ubuntu with shard 1/4 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node LTS using jest-jasmine2

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v18.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / Windows with shard 1/4 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v20.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v22.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)

Check failure on line 50 in e2e/__tests__/jest.config.ts.test.ts

View workflow job for this annotation

GitHub Actions / macOS with shard 1/3 / Node v24.x

falls back to a loader if we encounter a ESM TS config file in a CommonJs project

expect(received).toMatchSnapshot() Snapshot name: `falls back to a loader if we encounter a ESM TS config file in a CommonJs project 2` New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. Received: "Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <<REPLACED>> Ran all test suites." at Object.toMatchSnapshot (e2e/__tests__/jest.config.ts.test.ts:50:19)
});

test('works with tsconfig.json', () => {
writeFiles(DIR, {
'__tests__/a-giraffe.js': "test('giraffe', () => expect(1).toBe(1));",
Expand Down
26 changes: 23 additions & 3 deletions packages/jest-config/src/readConfigFileAndSetRootDir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,29 @@
let configObject;

try {
// @ts-expect-error: type assertion can be removed once @types/node is updated to 23 https://nodejs.org/api/process.html#processfeaturestypescript
if (isTS && !process.features.typescript) {
configObject = await loadTSConfigFile(configPath);
if (isTS) {
// @ts-expect-error: Type assertion can be removed once @types/node is updated to 23 https://nodejs.org/api/process.html#processfeaturestypescript
if (process.features.typescript) {
try {
// Try native node TypeScript support first.
configObject = await requireOrImportModule<any>(configPath);
} catch (error) {
if (
!(
error instanceof SyntaxError &&
// Likely ESM in a file interpreted as CJS, which means it needs to be
// compiled. We ignore the error and try to load it with a loader.
error.message.match(/Unexpected token '(export|import)'/)

Check failure on line 54 in packages/jest-config/src/readConfigFileAndSetRootDir.ts

View workflow job for this annotation

GitHub Actions / Lint

Prefer `RegExp#test(…)` over `String#match(…)`
)
) {
throw error;
}
}
}
// Fall back to `ts-node` etc. if this cannot be natively parsed/executed.
if (!configObject) {
configObject = await loadTSConfigFile(configPath);
}
} else if (isJSON) {
const fileContent = fs.readFileSync(configPath, 'utf8');
configObject = parseJson(stripJsonComments(fileContent), configPath);
Expand Down
Loading