Vitest Browser Vue Component Testing
JSON →vitest-browser-vue is a library designed for rendering Vue 3 components within Vitest's browser testing environment, adhering to the principles of `@testing-library`. It facilitates writing integration tests by exposing Vitest `locators` and utilities that mimic how users interact with components in a real browser. The current stable version is 2.1.0, with releases occurring regularly, indicating active development and maintenance. A key differentiator from `@testing-library/vue` is its cleanup strategy: it cleans up the component *before* a test starts, rather than after, allowing developers to inspect the rendered UI during debugging. It integrates seamlessly with Vitest's `page.render` and `cleanup` methods and leverages `@vue/test-utils` under the hood for component mounting and interaction. Users must ensure compatibility with `vitest` version `4.0.0` or higher and `vue` version `3.0.0` or higher.
Traffic · last 30 days ↓50% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇮 Finland · 🇩🇪 Germany · 🇫🇷 France