Now we'd like to do the same thing for our tests for square a number function. We'll use expect to assert that the response is indeed the number 9 and that the type is a number. We'll use these same two assertions we do with the add function. First, we need to do to delete the current square if condition code, since we will not be using that anymore. As shown in the following code, we'll make some expectations about the res variable. We'll expect it to be the number 9, just like this:
it('should square a number', () => {
var res = utils.square(3);
expect(res).toBe(9);
});
We'll save the file and make sure the test passes, and it does indeed pass:

Now, we'll assert the type using toBeA. Here, we're checking that the type of the return value from the square method is a number:
it('should square a number', () => {
var res = utils.square(3);
expect(res).toBe(9).toBeA('number');
});
When we save the file, we get both of our tests still passing, which is fantastic:

Now this is just a small test as to what expect can do. Let's create a bogus test case that will explore a few more ways we can use expect. We'll not be testing an actual function. We'll just play around with some assertions inside of the it callback.