Running testing in js
Often when testing, you use the actual result to create your assertion and have to manually update it as you make changes to the feature. With Jest snapshot testing, you can let Jest do this part for you and write more tests and features faster and with more confidence. Let's learn about how you can use Jest snapshot testing to improve your own workflow.
In this lesson, we'll write a brand new function called
arrayify using the Test Driven Development workflow of red-green-refactor. Test Driven Development (aka TDD) is great because it helps you focus on one task at a time and when you're all finished, you can refactor or add features with confidence because the test suite acts as a safety net. In this lesson we're using the amazing Jest testing framework.
This course is designed to give you the power to not only create composable elements but to create predictable React components. We will review most of the concepts required to make intuitive tests based on how our users will interact with the components.
The course begins with basic concepts of setup and installing configurations to work with any release of React. Throughout the course we break down selectors, rendering methods, snapshot testing, and how to replicate user activity. We finish the course with more advanced lessons, the 'putting it all together' tutorials. We test a basic React form and a Redux connected component.