From c0beb86f6394fdb0d4fb47472a068abb7e941ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 20 Mar 2019 04:49:59 -0700 Subject: [PATCH] chore: update Jest preset to align with Jest 24 (#24062) Summary: Jest 24 includes [`testMatch` and `moduleFileExtensions`](https://github.com/facebook/jest/blob/c5fd7aae93764c13c259ae9a73846c10e84ae2a3/packages/jest-config/src/Defaults.ts#L70) that align with the ones that are currently there on master, because it added default handling for TypeScript as well. I think it's time for us to move to Jest 24. Is there a way we can tell users to upgrade Jest to certain version? Fixes https://github.com/facebook/react-native/issues/24060 [General] [Changed] - update Jest preset to align with Jest 24 Pull Request resolved: https://github.com/facebook/react-native/pull/24062 Differential Revision: D14538988 Pulled By: cpojer fbshipit-source-id: d8d152b8e8517b34144970f1cc1ed0b49f8b4e54 --- jest-preset.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/jest-preset.js b/jest-preset.js index 249ec2d7b..6c2e42715 100644 --- a/jest-preset.js +++ b/jest-preset.js @@ -18,7 +18,6 @@ module.exports = { hasteImplModulePath: require.resolve('./jest/hasteImpl.js'), providesModuleNodeModules: ['react-native'], }, - moduleFileExtensions: ['js', 'json', 'jsx', 'node', 'ts', 'tsx'], moduleNameMapper: { '^React$': require.resolve('react'), }, @@ -32,10 +31,6 @@ module.exports = { transformIgnorePatterns: [ 'node_modules/(?!(jest-)?react-native|react-clone-referenced-element)', ], - testMatch: [ - '**/__tests__/**/*.(js|ts|tsx)', - '**/?(*.)+(spec|test).(js|ts|tsx)', - ], setupFiles: [require.resolve('./jest/setup.js')], testEnvironment: 'node', };