Skip to content
プロジェクト

概要

Vue 3向けの Vue Test Utils

Web・アプリ開発

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
+2
1か月
+4

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Vue Test Utils

Component testing utils for Vue 3.

Languages

🇫🇷 French version of this 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.

Coming from Vue 2 + Test Utils v1?

Check the migration guide. 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.

Development

Get started by running pnpm install. You can run the jsdom tests (including Node-only SSR tests) with pnpm test.

To run tests in Chromium using Vitest Browser Mode, install Chromium with pnpm exec playwright install chromium, then run pnpm test:browser. Add --run to either test command for a single run instead of watch mode.

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:

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: 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.

  • 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.

関連プロジェクトを探す

読み込み中…