SyntaxError: Missing initializer in const declaration

前端 未结 2 1789
没有蜡笔的小新
没有蜡笔的小新 2020-12-06 17:10

I am writing a simple test using react-native-testing-library (my first steps with that library) in my react native expo app. But I am getting a confused error

相关标签:
2条回答
  • 2020-12-06 17:42

    I resolved this added "preset": "react-native" in jest.config.js file

    0 讨论(0)
  • 2020-12-06 17:48

    I am using expo in my project. I have same issue. i forgot to add "preset": "jest-expo" to package.json. i added then the problem solved.

     "jest": { "preset": "jest-expo" },
    
    0 讨论(0)
提交回复
热议问题