The plan

Now that our testing config has been updated and is working correctly, we can begin thinking about test-driving our first feature.

In earlier chapters, we discussed where to start testing and decided that if possible an inside-out approach is preferred. To keep with that approach, we want to determine the different parts of our React app so that we can target the purest business logic we can.

Right off the bat, regardless of any other architectural choices, we can identify the React component and a service representing communication with our data source. We are planning to use Redux in this app so that makes up the missing piece and connects our component with our data.

Which one of these is the business logic though? Out of those base options, what would we even test? Let's examine each one a little more closely and see what we could test that would be considered a unit test.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.23.4