Open hectorsuarezm opened 4 years ago
I have the same issue
I had the same issue and created the file __mocks__/@react-native-community/art.js
with the following content mocking component I use from ART :
export const Surface = () => null;
export const Shape = () => null;
I was able to fix this issue using the jest transformIgnorePatterns option.
// jest.config.js
module.exports = {
preset: 'react-native',
// ... other configs
"transformIgnorePatterns": [
// Add @react-native-community/art to the list
"node_modules/(?!(react-native|@react-native-community/art)/)"
]
};
"node_modules/(?!(jest-)?react-native|react-(native|universal|navigation)-(.)|@react-native-community/(.)|@react-navigation/(.*))"
Can use in case of multiple modules, works perfect
I'm probably missing something, because I don't see this question anywhere in stack overflow or any other place. I'm trying to run Jest in a component and in the app we use '@react-native-community/art' but I'm receiving an unexpected token exception.
` ● Test suite failed to run
Have anyone experienced this before ?