Testing Vue.js Components
🚧 PLEASE NOTE: An updated version of this course is available! see the Rapid Testing with Vitest: Master Unit Testing & Mocking course. This course is outdated!

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.