
Vue Test Utils
The official testing utility library for Vue 3, used to mount components and interact with them in unit tests.
Vue Test Utils is the official low-level library for testing Vue components. It lets you mount a component in isolation, pass props and slots, trigger DOM events, and make assertions about the rendered output and emitted events.
It does not depend on a particular test runner and works well with Vitest or Jest. Helpers cover stubbing child components, installing global plugins such as a router or store for a test, and waiting for async updates with flushPromises.
Install it as a dev dependency with npm install -D @vue/test-utils and start with the mount function in your test files.





