Demo code to go along with my presentation at the React Native meetup in San Francisco 8/21/2019
Slides can be found here
For more detailed information about what Jest can do, see the Jest documentation
Just about everybody would agree that writing good unit tests results in a better codebase; the act of writing the tests helps make sure that edge cases are covered and that code is written in clean, testable pieces, and down the line, they can catch regressions. In this talk, I'll introduce the Jest testing library and then use it to get one hundred percent test coverage on an example component. Along the way we will talk about async testing, mocks, and spies, and discuss how to build your test suites so that the results are still meaningful next week and beyond.
About Milli:
Milli is a software engineer at Skillz where she has been working with React Native in a large-scale production app for close to two years. She also has experience building and maintaining an automated testing framework.
Ensure that you have the dependencies for React Native installed (follow the instructions on React Native's start page)
Clone the repo
In terminal in your project directory, run react-native run-ios
To run the tests, simply run yarn test