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

Multi tool use
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)/)"
]





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






@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.

b9a3L 6n YX3dnttIDOoX6lma4q6R73,kMezvjQCRH rVWJRNUGbCq6
YV gHBE vS5kW8UEk,9 E xQozSTu

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications