Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Testing Vue.js Components

Get access to this course, 15 others, and future Vue.js courses!

Start Learning

Already got an account? Log in

Mounting Components with Vue Test Utils

When we’re testing our vue.js components, we need a way to mount and render the component.

In this lesson, we’ll see the mount function in action. Mount creates a Wrapper that contains the mounted and rendered Vue component. We use this wrapper to test our component in various ways.

In this lesson, we’ll take a look at the Wrapper HTML function, which returns the entire component DOM node as a string.

If you want to learn more about snapshots, check out Snapshot Testing with Jest.