Using spies
In this video, we'll complete the tests for our Item view component. We'll also be introducted to another Jest feature called "spies" that will help us to make assertions about our component output.
Let's now return to our "should add item to cart when user authenticated" test. In the last video, we set up an authenticated user and triggered a click on the Add to Cart button.
Click to load comments...