Vue Test Utils screenshot

Vue Test Utils

Author Avatar Theme by Vuejs
Updated: 16 Aug 2023
3570 Stars

Component Test Utils for Vue 2

Categories

Overview

Vue Test Utils is a set of component testing utilities for Vue 2. It consists of two packages: Vue Test Utils and Vue Server Test Utils. These packages allow developers to efficiently test Vue components.

Features

  • Component Testing Utilities: Specifically designed for testing Vue components.
  • Two Packages: Provides Vue Test Utils and Vue Server Test Utils for different testing scenarios.
  • Peer Dependencies: Requires installation of vue-template-compiler that matches the Vue version being used for component compilation.

Installation

To install Vue Test Utils and Vue Server Test Utils, use the following command:

npm install @vue/test-utils

Ensure to also install the peer dependency vue-template-compiler:

npm install vue-template-compiler@<version>

Summary

Vue Test Utils is a valuable tool for Vue developers to conduct efficient and effective testing of their Vue components. By following the installation guide and utilizing the provided packages, developers can enhance the quality and reliability of their Vue applications.