When debugging our tests, one important part is understanding how our UI looks after our component renders or after we apply some changes to it.
In this lesson, we are going to review one util that allows us to print to our console a representation of the DOM tree of our elements: the debug
Instructor: [0:04] If at any test case, you want to be sure you have queried for the right thing, you can leverage debug. Besides allowing you to see the current way your container looks, if you pass an element to it, it will show it to you. All we need to do is call debug.
[0:13] You can destructure it from render, or just call screen.debug. Then what you need to do is pass it the element you want to pre-reprint to your DOM. If you run your test, you should not see it printed there.