InfiniteXyy / vitest-explorer

VSCode extension for vitest

Home Page:https://marketplace.visualstudio.com/items?itemName=ZixuanChen.vitest-explorer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Vitest for VSCode Logo

Vitest for VSCode


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

This plugin is based on vscode testing api.

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 be the same command line users run vitest tests from a terminal/shell, with ability to append extra arguments (by the extension at runtime). For example npx vitest or yarn test -- --run
  • 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

TODOs

  • Dynamic test name and test.each are not supported yet
  • Support multi-root workspaces

About

VSCode extension for vitest

https://marketplace.visualstudio.com/items?itemName=ZixuanChen.vitest-explorer

License:MIT License


Languages

Language:TypeScript 100.0%