The video for this lesson is currently being updated, please read the transcript instead.

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.

To view the complete lesson you'll need to login or join this course.


Click to load comments...