Skip to content

What do you think about Visual Studio Marketplace? We are looking for feedback from developers like you! Take the survey

| Marketplace
Sign in
Visual Studio Code>Testing>Vitest PlusNew to Visual Studio Code? Get it now.

Vitest Plus

Preview

Weijan Chen

|
739 installs
| (3) | Free
Run and debug Vitest test cases
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info


Vitest for VSCode Logo

Vitest for VSCode


This extension is powered by vscode testing api.

Features

  • Run/debug vitest tests in vscode
  • Watch mode is supported 🎊. Test reruns are blazing fast

Watch Mode

Requirements

  • Require VSCode's version >= July 2021 (version 1.59).
  • Require Vitest's version >= v0.12.0

Config

  • vitest.enable: This plugin will try to detect whether the current project is set up with Vitest to activate itself. When it failed, you can enable the plugin manually
  • vitest.nodeEnv: The env passed to runner process in addition to process.env
  • vitest.commandLine: The command line to start vitest tests. It should have with the ability to append extra arguments. For example npx vitest or yarn test --.(This is a workspace setting. Do not change it in the user setting directly, which will affect all the projects you open)
  • vitest.include: Include glob for test files. Default: [\"**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}\"]
  • vitest.exclude: Exclude globs for test files. Default: [\"**/node_modules/**\", \"**/dist/**\", \"**/cypress/**\", \"**/.{idea,git,cache,output,temp}/**\"]

Screenshots

Filter tests by status

Debug

Inspect console output

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft