# @vue/test-utils

Latest version **2.5.1** (published 2026-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vue/test-utils
pnpm add @vue/test-utils
yarn add @vue/test-utils
bun add @vue/test-utils
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.5.1 |
| Published | 2026-09-16 |
| First published | 2018-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1157 |
| Author | Lachlan Miller |
| Maintainers | lmiller1990, yyx990803, danielroe |

## Links

- npm: https://www.npmjs.com/package/@vue/test-utils
- Repository: https://github.com/vuejs/test-utils
- npm.io page: https://npm.io/package/@vue/test-utils

## Dependencies (2)

- [js-beautify](https://npm.io/package/js-beautify.md) ^2.0.0
- [vue-component-type-helpers](https://npm.io/package/vue-component-type-helpers.md) ^3.0.0

## Recent versions

- 2.5.1 (latest) — 2026-09-16
- 1.3.6 (legacy) — 2023-06-05
- 2.4.0-alpha.2 (v2.4.0-alpha.2) — 2023-06-05
- 2.4.0-alpha.0 (2.4.0-alpha.0) — 2023-04-16
- 2.0.0-rc.18 (2.0.0-rc.18) — 2021-12-21
- 2.0.0-rc.16 (2.0.0-rc.16) — 2021-10-13
- 2.0.0-rc.14 (2.0.0-rc.14) — 2021-09-06
- 2.0.0-rc.12 (2.0.0-rc.12) — 2021-07-28
- 2.0.0-rc.11 (2.0.0-rc.11) — 2021-07-27
- 2.0.0-rc.10 (2.0.0-rc.10) — 2021-07-06
- 2.0.0-rc.9 (2.0.0-rc.9) — 2021-06-24
- 2.0.0-rc.8 (2.0.0-rc.8) — 2021-06-21
- 2.0.0-rc.7 (2.0.0-rc.7) — 2021-06-20
- 2.0.0-rc.6 (2.0.0-rc.6) — 2021-04-19
- 2.0.0-rc.5 (2.0.0-rc.5) — 2021-04-19
- … 111 more at https://npm.io/package/@vue/test-utils/versions

## README

# Vue Test Utils

Component testing utils for Vue 3.

## Languages

[🇫🇷 French version of this README.md](https://github.com/vuejs/test-utils/tree/main/docs/fr/README.md)

## Installation and Usage

- yarn: `yarn add @vue/test-utils --dev`
- npm: `npm install @vue/test-utils --save-dev`

Get started with the [documentation](https://test-utils.vuejs.org/).

## Coming from Vue 2 + Test Utils v1?

[Check the migration guide](https://test-utils.vuejs.org/migration/). It's still a work in progress. If you find a problem or something that doesn't work that previously did in Vue Test Utils v1, please open an issue.

## Documentation

See the [docs](https://test-utils.vuejs.org/).

## Development

Get started by running `pnpm install`. You can run the tests with `pnpm test`. That's it!

## Releasing

Releases are published to npm from GitHub Actions using npm trusted publishing.
Publishing with npm tokens is disabled, so a release requires:

- write access to the `vuejs/test-utils` repository
- the release commit to be on `main`
- `package.json` to contain the version being released
- approval from a maintainer with access to the `npm-publish` GitHub environment

To cut a release, push a version tag from `main`:

```sh
git checkout main
git pull
git tag v2.x.y
git push origin v2.x.y
```

Pushing a `v*` tag starts the release workflow.
The workflow builds the package, pauses for approval in the `npm-publish` environment,
then publishes `@vue/test-utils` to npm after approval.
The person who pushed the tag cannot self-approve the publish step.

## Contributing Docs

All the documentation files can be found in `docs`. It contains the English markdown files while translation(s) are stored in their corresponding `<lang>` sub-folder(s):

- [`fr`](https://github.com/vuejs/test-utils/tree/main/docs/fr): French translation.

Besides that, the `.vitepress` sub-folder contains the config and theme, including the i18n information.

- `pnpm docs:dev`: Start the docs dev server.
- `pnpm docs:build`: Build the docs.

To add or maintain the translations, we follow the [Vue Ecosystem Translation Guidelines](https://github.com/vuejs-translations/guidelines/blob/main/README_ECOSYSTEM.md).

- `pnpm docs:translation:status [<lang>]`: Show the translation status for your language. If you don't specify a language, it will show the status for all languages.
- `pnpm docs:translation:compare <lang>`: Compare the docs with the latest checkpoint for your language.
- `pnpm docs:translation:update <lang> [<commit>]`: Update the checkpoint for your language. The checkpoint will be set by the latest commit hash. However, you can also specify a commit hash manually.

---
_Source: https://npm.io/package/@vue/test-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
