Repository: facebook/jest
File: jest.config.mjs (JavaScript)

Code before:
    '/examples/',
    '/e2e/.*/__tests__',
    '/e2e/global-setup',
    '/e2e/global-teardown',
    '/e2e/custom-*',
    '/e2e/test-in-root',
    '/e2e/run-programmatically-multiple-projects',
    '/e2e/multi-project-babel',
    '\\.snap$',
    '/packages/.*/build',
    '/packages/.*/src/__tests__/setPrettyPrint.ts',
    '/packages/jest-core/src/__tests__/test_root',
    '/packages/jest-haste-map/src/__tests__/haste_impl.js',
    '/packages/jest-haste-map/src/__tests__/dependencyExtractor.js',
    '/packages/jest-haste-map/src/__tests__/test_dotfiles_root/',
    '/packages/jest-repl/src/__tests__/test_root',
    '/packages/jest-runtime/src/__tests__/defaultResolver.js',
    '/packages/jest-runtime/src/__tests__/module_dir/',
    '/packages/jest-runtime/src/__tests__/NODE_PATH_dir',
    '/packages/jest-snapshot/src/__tests__/plugins',
    '/packages/jest-snapshot/src/__tests__/fixtures/',
    '/e2e/__tests__/iterator-to-null-test.ts',
    '/e2e/__tests__/tsIntegration.test.ts', // this test needs types to be build, it runs in a separate CI job through `jest.config.ts.mjs`
    ...(process.env.JEST_JASMINE
      ? ['/e2e/__tests__/testFailingSnapshot.test.js']
      : []),
  ],
  testTimeout: 70_000,
  transform: {
    '\\.[jt]sx?$': require.resolve('babel-jest'),
  },
  watchPathIgnorePatterns: [
    'coverage',
    '<rootDir>/packages/jest-worker/src/workers/__tests__/__temp__',
  ],
  watchPlugins: [
    require.resolve('jest-watch-typeahead/filename'),
    require.resolve('jest-watch-typeahead/testname'),
  ],
};


Review comment (suggestion):
please use https://github.com/jestjs/jest/blob/5aeee2efc5312f672ea16190ef37ecc45bc457fd/packages/test-utils/src/ConditionalTest.ts#L17 instead

Code after:
    '/examples/',
    '/e2e/.*/__tests__',
    '/e2e/global-setup',
    '/e2e/global-teardown',
    '/e2e/custom-*',
    '/e2e/test-in-root',
    '/e2e/run-programmatically-multiple-projects',
    '/e2e/multi-project-babel',
    '\\.snap$',
    '/packages/.*/build',
    '/packages/.*/src/__tests__/setPrettyPrint.ts',
    '/packages/jest-core/src/__tests__/test_root',
    '/packages/jest-haste-map/src/__tests__/haste_impl.js',
    '/packages/jest-haste-map/src/__tests__/dependencyExtractor.js',
    '/packages/jest-haste-map/src/__tests__/test_dotfiles_root/',
    '/packages/jest-repl/src/__tests__/test_root',
    '/packages/jest-runtime/src/__tests__/defaultResolver.js',
    '/packages/jest-runtime/src/__tests__/module_dir/',
    '/packages/jest-runtime/src/__tests__/NODE_PATH_dir',
    '/packages/jest-snapshot/src/__tests__/plugins',
    '/packages/jest-snapshot/src/__tests__/fixtures/',
    '/e2e/__tests__/iterator-to-null-test.ts',
    '/e2e/__tests__/tsIntegration.test.ts', // this test needs types to be build, it runs in a separate CI job through `jest.config.ts.mjs`
  ],
  testTimeout: 70_000,
  transform: {
    '\\.[jt]sx?$': require.resolve('babel-jest'),
  },
  watchPathIgnorePatterns: [
    'coverage',
    '<rootDir>/packages/jest-worker/src/workers/__tests__/__temp__',
  ],
  watchPlugins: [
    require.resolve('jest-watch-typeahead/filename'),
    require.resolve('jest-watch-typeahead/testname'),
  ],
};