Skip to main content
Cypress App

Vue API

Methods

mount

import { mount } from 'cypress/vue'
Description

Used for mounting Vue components in isolation. It is responsible for rendering the component within Cypress's sandboxed iframe and handling any framework-specific cleanup.

Signature

mount(originalComponent: { new (...args: any[]): ; __vccOpts: any; }, options?: MountOptions): Cypress.Chainable<MountReturn>

mount Parameters
NameTypeDescription
originalComponentnew (...args: any[])The component to mount in test
optionsMountOptions (optional)The options for mounting the component

Interfaces

MountOptions

(Vue 3 MountingOptions or Vue Test Utils)

MountReturn

Type that the mount function yields

members
NameTypeDescription
wrapperVueWrapperThe Vue Test Utils wrapper
componentVueComponentThe component instance