The Wrapper Object
In this lesson, we will learn about the main object of `vue-test-utils: the Wrapper Object.
We'll cover the following
So far, we’ve made tests using Jest Snapshots. In most cases, that’s what we’ll use, but sometimes we want to assert something more specific.
Although you can access the Vue instance via cmp.vm
, you have a set of utilities at your disposal to make it easier. Let’s see what we can do.
The Wrapper Object
The Wrapper
is the main object of vue-test-utils
. It is the type returned by mount, shallowMount, find and findAll functions.
find
and findAll
They accept a selector
as an argument, which can be both a CSS selector or a Vue Component.
So we can do things like:
Get hands-on with 1400+ tech skills courses.