mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Mike Grabowski
parent
27872cf97c
commit
dc25f209d7
@@ -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'),
|
||||
},
|
||||
@@ -30,10 +29,6 @@ module.exports = {
|
||||
),
|
||||
},
|
||||
transformIgnorePatterns: ['node_modules/(?!(jest-)?react-native)'],
|
||||
testMatch: [
|
||||
'**/__tests__/**/*.(js|ts|tsx)',
|
||||
'**/?(*.)+(spec|test).(js|ts|tsx)',
|
||||
],
|
||||
setupFiles: [require.resolve('./jest/setup.js')],
|
||||
testEnvironment: 'node',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user