diff --git a/packages/react-native/jest.config.js b/packages/react-native/jest.config.js new file mode 100644 index 0000000000..d510bded33 --- /dev/null +++ b/packages/react-native/jest.config.js @@ -0,0 +1,9 @@ +/** @type {import('jest').Config} */ +const config = { + preset: 'react-native', + modulePathIgnorePatterns: ['dist/'], + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], + transformIgnorePatterns: ['node_modules/(?!react-native|@react-native)'], + setupFilesAfterEnv: ['/../../node_modules/react-native-gesture-handler/jestSetup.js'], +}; +module.exports = config; diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 9af03cdd33..bc883dde36 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -37,23 +37,6 @@ "test": "jest", "test:ci": "jest" }, - "jest": { - "transformIgnorePatterns": [ - "node_modules/(?!react-native|@react-native)" - ], - "modulePathIgnorePatterns": [ - "dist/" - ], - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json", - "node" - ], - "preset": "react-native" - }, "dependencies": { "@storybook/channels": "^8", "@storybook/client-logger": "^8",