Loading

We’ve finished with our post editor component, but let’s not forget the refactor phase! We have a bunch of duplicate logic between our two tests. When you have multiple tests with duplicate logic, it becomes hard for folks who come to maintain the tests later to identify what the differences between the tests are. This makes it harder to understand what the different features of the component are. So let’s refactor the tests slightly so we can communicate clearly what the important and unique parts of the tests are to make it easier for future maintainers.

Transcript

Write a Custom Render Function to Share Code between Tests and Simplify Tests