Closed fajarmf10 closed 4 years ago
How do you solve this issue ??
@stargamerboy786 just add it to transformIgnorePatterns before:
"transformIgnorePatterns": [
"node_modules/(?!(jest-)?@?react-native|@react-native-community|@react-navigation|victory|victory-native)"
],
after:
"transformIgnorePatterns": [
"node_modules/(?!(jest-)?@?react-native|@react-native-community|@react-navigation|victory|victory-native|rn-range-slider)"
],
How do you test this module on jest? It always throw me an error like this:
/node_modules/rn-range-slider/index.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import React, {PureComponent} from 'react'; SyntaxError: Unexpected identifier
it points to the import React. the same happens on FontAwesome, but I could mock the FontAwesome using this