Running the tests is achieved with a single command, as before:
npm test
The output is as shown in the following screenshot—note that we also ran some tests we had copied from the React chapter, without any changes, and they also performed perfectly:
All our components' tests run OK
So, apart from the need to use shallow rendering, and possibly some changes in the way we access elements or simulate events, coding unit tests for RN is pretty much the same as for React, which is good news. We are forgetting something, however – what about snapshot testing? Let's move on to that.