kodmunki Utilities for ECMAScript React Testing
npm i --save-dev mocha babel-preset-react-native babel-preset-env
Add the following line to the scripts
section of your package.json
file.
"test": "mocha -R spec --compilers js:node_modules/ku4es-react-native-testing/ --recursive ./test"
https://reactjs.org/docs/test-renderer.html#testinstanceinstance https://reactjs.org/docs/test-renderer.html#testrendererroot
https://reactjs.org/docs/shallow-renderer.html
https://facebook.github.io/jest/docs/en/tutorial-react-native.html https://nodejs.org/api/all.html#all_require_extensions https://formidable.com/blog/2016/02/08/unit-testing-react-native-with-mocha-and-enzyme/ https://gist.github.com/jmreidy/4145809229195441d4d4 - (Used this one)