This application is a companion to Bonnie Schulkin's course on Testing React with Jest and React Testing Library. I really enjoyed getting to dive into JEST and RTL and use them in a project. The application utilizes the Context API for sharing information and behavior across multiple related components, so I got practice with setting up tests that provide a wrapper around the rendered component. I also got another chance to work with the mock service worker (msw) package that I was really excited about for its teaching potential.
The course focuses on functional testing–finding UI elements by their accessible roles and ensuring that the user interactions lead to the desired result. One of the great side effects of this is that the tests are coupled with the desired behavior rather than with a particular implementation. When I made a couple of changes after completing the coursework to prepare it for deployment, I was able to easily make a couple of small updates to the tests so that they aligned with the new behavior. NOTE: This application doesn't persist any data and is actually using MSW in production here to simulate having a running server. Feel free to check out the code on GitHub for more info on how this is done.