jest test always failing on import './environment/validate';

Multi tool use
jest test always failing on import './environment/validate';
need help on this if anyone encountered this maybe you can share your solution thanks.
so every time i test my component i always see this error,
Im not sure what part i did wrong on this can anyone help me on this.
Test suite failed to run
/project/node_modules/expo/src/Expo.js:2
import './environment/validate';
^^^^^^
SyntaxError: Unexpected token import
i tried adding ignore transformIgnorePatterns by adding (jest-)?
still not working
your help is greatly appreciated thank you
1 Answer
1
What is the transformIgnorePattern that you used? It should look something like this:
"transformIgnorePatterns": [
"node_modules/(?!(expo)/)"
]
@correctify Alright, maybe you need all of that stuff. Just add
|expo
into your transformIgnorePatterns
and try it again?– Anthony Morris
Jul 3 at 15:27
|expo
transformIgnorePatterns
Hi @Anthony Morris thanks for the help yes it works thank you
– correctify
Jul 6 at 3:33
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
here is my transformIgnorePatterns pattern "node_modules/(?!react-native|native-base-shoutem-theme|@shoutem/animation|@shoutem/ui|tcomb-form-native)" i tried replacing it with what you send this gives me 3 more error i use this ignore the connect error from using native-base
– correctify
Jul 3 at 8:04