Test with Jest
Plans from $25/month

This lesson is for members. Join us?

Subscribe now to get instant access to this course, plus a full library of Vue.js courses tailored to the plan you choose.

Jest Expectations

In this lesson, we're diving a little further into the Jest expectations that we can use to test different data types.

We'll learn why we have to use toEqual() instead of toBe() when testing arrays and objects. We will also learn about a handy technique that uses property matchers.

We can use property matchers when we need to test properties that produce random values, where we do not care about the exact value, like a date.