Closed myrjola closed 7 years ago
I added tests for https://github.com/myrjola/beersunderx/blob/master/reducers/walkingDirections.js to https://github.com/myrjola/beersunderx/blob/master/reducers/__tests__/walkingDirections.js following this guide https://blog.callstack.io/unit-testing-react-native-with-the-new-jest-ii-redux-snapshots-for-your-actions-and-reducers-8559f6f8050b. I must say that snapshot based testing is pretty neat.
We now have CI through https://travis-ci.com/myrjola/beersunderx
Not full test coverage, but we're getting there.
Running
npm test
only runseslint
. It's nice that it enforces coding conventions, but I think some more tests wouldn't hurt. I just don't know any good testing strategy for React Native and Redux yet. One thing I noticed was that React Native Components won't render locally. They need to be rendered straight to devices or simulators/emulators.