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

Using mocks

In this video, we're going to be writing tests for our Home view component, and also learn about a very useful unit testing feature called mocks.

Creating file

Let's begin by creating a test file for the Home component. Before we do, though, we'll create a new subdirectory for view test, as we want our client test directory to have the same structure as the client directory itself. So let's go:

$ mkdir tests/unit/client/views

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


Click to load comments...