react-native mount component without enzyme -


my test app built latest version of react-native , react [using expo app after following guidlines facebook].

  "dependencies": {      "expo": "18.0.3",      "react": "16.0.0-alpha.12",      "react-native": "0.45.1",      "react-navigation": "1.0.0-beta.11"    } 

now i'm stuck while writing tests cant use enzyme latest version of react-native.

check below thread https://github.com/airbnb/enzyme/issues/928

and want test componentdidmount, fetches data , updates state of component re-render.

now how test without using enzyme. enzyme had mount function made possible , dont have shallow render comes part of 'react-test-renderer'

my devdependencies follows:

  "devdependencies": {      "jest-expo": "~18.0.0",      "jsdom": "^11.1.0",      "react-native-scripts": "0.0.40",      "react-test-renderer": "16.0.0-alpha.12"    },   "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",   "scripts": {       "start": "react-native-scripts start",       "android": "react-native-scripts android",       "test": "node node_modules/jest/bin/jest.js --env=jsdom"    },  


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -