Vue API
Methods​
mount​
// Vue 3
import { mount } from 'cypress/vue'
// Vue 2
import { mount } from 'cypress/vue2'
| 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> |
| Name | Type | Description |
| originalComponent | new (...args: any[]) | The component to mount in test |
| options | MountOptions (optional) | The options for mounting the component |
Interfaces​
MountOptions​
(Vue 3 MountingOptions or Vue 2 MountingOptions) from Vue Test Utils
MountReturn​
Type that the mount function yields
| Name | Type | Description |
| wrapper | VueWrapper | The Vue Test Utils wrapper |
| component | VueComponent | The component instance |