VOOZH about

URL: https://marketplace.visualstudio.com/items?itemName=rluvaton.vscode-vitest

⇱ Vitest Runner for VSCode that actually work - Visual Studio Marketplace


Skip to content
👁 Image
Sign in
Visual Studio Code>Testing>Vitest Runner for VSCode that actually workNew to Visual Studio Code? Get it now.
👁 Vitest Runner for VSCode that actually work

Vitest Runner for VSCode that actually work

Vitest Runner for VSCode that actually work
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-vitest

Vitest runner for vscode that actually works

Run/Watch/debug any test (it, test, or describe) in .js, .ts, .jsx, or .tsx files:

👁 preview

Extension Settings

Command Description Examples Default
vscode-vitest.preTest Any command(s) to run before test starts ["npm run script1", "npm run script2" (will run in the given order. If command(s) fail, tests will not run) []
vscode-vitest.postTest Any command(s) to run after test finishes ["npm run clean1", "npm run clean2" (will run in the given order) []
vscode-vitest.packageManager Desired package manager npm, yarn, pnpm, pnpn dlx, etc npx
vscode-vitest.testCommand Define an alternative vitest command test (e.g. for CRA, package.json test script, or similar abstractions) vitest
vscode-vitest.extraArguments Any additional vitest arguments --silent=true --maxWorkers=2 ""
vscode-vitest.executableOptions Executable option to show {"debug": false, "run": false} (will only display watch) {"debug": true,"run": true, "run": true}

Example Settings:

 "vscode-vitest.preTest": ["npm run script1"],
 "vscode-vitest.postTest": ["npm run cleanAfterTest"],
 "vscode-vitest.packageManager": "pnpm",
 "vscode-vitest.testCommand": "test",
 "vscode-vitest.extraArguments": "--silent --maxWorkers=2",
 "vscode-vitest.executableOptions": {
 "debug": false,
 "watch": false
 },