Testing
This document provides an overview of how to test an application built with @ionic/vue. Applications generated with the Ionic CLI are set up for unit testing with Vitest and Vue Test Utils, and for end-to-end testing with Cypress.
Unit Testing
Waiting for Components
When you need to wait for an Ionic component to render before asserting against its DOM, use the componentOnReady helper exported from @ionic/core. Do not call el.componentOnReady() directly. @ionic/vue uses Stencil's custom elements build, where that method does not exist on the element. The helper waits one animation frame instead, giving the component's inner contents a chance to render.