diff --git a/README.md b/README.md index fed622b0..7fff75ee 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,41 @@

-
- Vitest for VSCode Logo - + Vitest extension for Visual Studio Code logo

-

- Vitest for VSCode -

- -
+

Vitest extension for Visual Studio Code. Available on Visual Studio Marketplace.

![](https://i.ibb.co/bJCbCf2/202203292020.gif) -> This extension is powered by -> [vscode testing api](https://code.visualstudio.com/api/extension-guides/testing). +## Features -# Features - -- Run/debug vitest tests in vscode. +- **Run**, **debug**, and **watch** Vitest tests in Visual Studio Code. - NX support (see the [NX sample](./samples/monorepo-nx/)). -- Watch mode is supported 🎊. Test reruns are blazing fast. - A `@open` tag can be used when filtering tests, to only show the tests open in the editor. -![Watch Mode](https://i.ibb.co/YRhJj9f/Screen-Recording-2022-05-21-at-20-09-20.gif) - -# Requirements +## Requirements -- Require VSCode's version >= July 2021 (version 1.59). -- Require Vitest's version >= v0.12.0 +- Visual Studio Code version >= July 2021 (version 1.59). +- Vitest version >= v0.12.0 -# Config +## Configuration -- `vitest.enable`: This plugin will try to detect whether the current project is - set up with Vitest to activate itself. If detection fails, you can enable the plugin manually. -- `vitest.watchOnStartup`: Whether to activate Watch mode per default when the extension starts. -- `vitest.nodeEnv`: The env passed to runner process in addition to +- `vitest.enable`: Extension will automatically detect if the current project is using Vitest. If detection fails, extension can be manually enabled via this option. +- `vitest.watchOnStartup`: Whether to activate Watch mode by default when the extension starts. +- `vitest.nodeEnv`: Environment passed to the runner process in addition to `process.env` -- `vitest.commandLine`: The command line to start vitest tests. **It should have with the ability +- `vitest.commandLine`: Command to execute Vitest tests. **It should have 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.debugExclude`: Automatically skip files covered by these glob patterns. Default: + `npx vitest` or `yarn test --`. This is a workspace setting. Do not change it in + the user settings, since it will affect all the projects you open) +- `vitest.debugExclude`: Excludes files matching specified glob patterns from debugging. Default: `[\"/**\", \"**/node_modules/**\"]` -# Screenshots - -**Filter tests by status** - - - -**Debug** +## FAQs (Frequently Asked Questions) - - -**Inspect console output** - -![](https://i.ibb.co/gMZWXZQ/Screen-Recording-2022-03-29-at-20-59-31.gif) - -# FAQ - -#### **How can I use it in monorepo?** +### How can I use it in monorepo? See for monorepo support. -#### **How can I use this extension when tests are under a sub directory?** +### How can I use this extension when tests are under a sub directory? You can use VS Code command `add folder to workspace` to add the sub directory. The extension should work fine. - -#### **`test.each` is not working** - -Dynamic test name is not supported yet. This extension currently relies on the babel parser to calculate the positions of tests statically. - -Related issue: https://github.com/vitest-dev/vscode/issues/133