From d426c91a0796b3d9198fed44bff520a1d5a107be Mon Sep 17 00:00:00 2001 From: Daniel Williams Date: Mon, 27 May 2024 17:37:30 +0100 Subject: [PATCH] fix: tests --- packages/react-native/jest.config.js | 9 +++++++++ packages/react-native/package.json | 17 ----------------- 2 files changed, 9 insertions(+), 17 deletions(-) create mode 100644 packages/react-native/jest.config.js 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",