https://github.com/rluvaton/vitest-vs-code-plugin
Vitest VS Code plugin that actually work
https://github.com/rluvaton/vitest-vs-code-plugin
testing vitest vscode-extension
Last synced: over 1 year ago
JSON representation
Vitest VS Code plugin that actually work
- Host: GitHub
- URL: https://github.com/rluvaton/vitest-vs-code-plugin
- Owner: rluvaton
- License: mit
- Created: 2023-08-03T10:30:07.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-24T22:01:08.000Z (over 2 years ago)
- Last Synced: 2024-10-06T17:41:29.761Z (over 1 year ago)
- Topics: testing, vitest, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=rluvaton.vscode-vitest
- Size: 154 KB
- Stars: 4
- Watchers: 1
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:

## 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
},
```