Category: jestjs

Testing images imported in the component with Jest + React Native

This is my package.json configuration: “jest”: { “preset”: “react-native”, “transform”: { “^.+.js$”: “<rootDir>/node_modules/react-native/jest/preprocessor.js” }, “moduleNameMapper”: { “.(pdf|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$”: “<rootDir>/__mocks__/fileMock.js” } },

Continue reading