I’ve been using Expo for 3 weeks now, I’ve come to the point where I want to test things, for this I’ve seen Jest being the most used plug-in to test with react-native apps. However when installing Jest, my entire app will not run anymore and will give me no errors or whatsoever other than that the phone can’t contact the app. If I remove the node_modules and remove the Jest dependency, run npm install again, my app will work again. What am I doing wrong?
My package.json
{
“name”: “AwesomeApp”,
“jest”: {
“preset”: “jest-expo”
},
“version”: “0.0.0”,
“description”: “Hello Expo!”,
“author”: null,
“private”: true,
“scripts”: {
“test”: “jest”
},
“main”: “node_modules/expo/AppEntry.js”,
“dependencies”: {
“babel-preset-react-native-stage-0”: “^1.0.1”,
“dateformat”: “^2.0.0”,
“es6-promise”: “^4.1.1”,
“eslint”: “^4.7.0”,
“expo”: “^20.0.0”,
“flow”: “^0.2.3”,
“mobx”: “^3.2.2”,
“mobx-react”: “^4.2.2”,
“moment”: “^2.18.1”,
“native-base”: “^2.3.2”,
“react”: “15.6.1”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-20.0.0.tar.gz”,
“react-native-datepicker”: “^1.6.0”,
“react-native-modal”: “^4.0.0”,
“react-native-vector-icons”: “^4.4.0”,
“react-navigation”: “^1.0.0-beta.11”
},
“devDependencies”: {
“babel-eslint”: “^8.0.0”,
“babel-plugin-transform-decorators-legacy”: “^1.3.4”,
“eslint”: “^4.7.0”,
“eslint-plugin-react”: “^7.3.0”,
“jest-expo”: “^21.0.2”
}
}