diff --git a/jest-preset.json b/jest-preset.json index c7fb437e4..d9c84f84b 100644 --- a/jest-preset.json +++ b/jest-preset.json @@ -7,6 +7,14 @@ "react-native" ] }, + "moduleFileExtensions": [ + "js", + "json", + "jsx", + "node", + "ts", + "tsx" + ], "moduleNameMapper": { "^React$": "/node_modules/react" }, @@ -14,12 +22,16 @@ "/node_modules/react-native/Libraries/react-native/" ], "transform": { - "^.+\\.js$": "babel-jest", + "^.+\\.(js|ts|tsx)$": "babel-jest", "^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$": "/node_modules/react-native/jest/assetFileTransformer.js" }, "transformIgnorePatterns": [ "node_modules/(?!(jest-)?react-native|react-clone-referenced-element)" ], + "testMatch": [ + "**/__tests__/**/*.(js|ts|tsx)", + "**/?(*.)+(spec|test).(js|ts|tsx)" + ], "setupFiles": [ "/node_modules/react-native/jest/setup.js" ],