From 0c2c084e9777688c25b9b9ab784cf4729ce7b529 Mon Sep 17 00:00:00 2001 From: Milan Kovacic Date: Sat, 24 Feb 2024 12:33:29 +0000 Subject: [PATCH 1/2] docs: clean up readme file --- README.md | 67 +++++++++++++++++-------------------------------------- 1 file changed, 20 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index fed622b0..8b3e0e89 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,47 @@

-
- 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 +- Visual Studio Code version >= July 2021 (version 1.59). +- Vitest version >= v0.12.0 -- Require VSCode's version >= July 2021 (version 1.59). -- Require Vitest's version >= v0.12.0 +## Configuration -# Config - -- `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** - - - -**Inspect console output** - -![](https://i.ibb.co/gMZWXZQ/Screen-Recording-2022-03-29-at-20-59-31.gif) - -# FAQ +## FAQs (Frequently Asked Questions) -#### **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** +### `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. +Dynamic test names are not suppported yet. Extension currently relies on the babel parser to calculate the positions of tests statically. Related issue: https://github.com/vitest-dev/vscode/issues/133 From 79bf7e4f3a28d568f6d663f883e03c4e56673ff4 Mon Sep 17 00:00:00 2001 From: Milan Kovacic Date: Sat, 24 Feb 2024 17:48:32 +0000 Subject: [PATCH 2/2] docs: remove mention of "test.each" not being supported --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 8b3e0e89..7fff75ee 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,3 @@ See for monorepo support. ### 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 names are not suppported yet. Extension currently relies on the babel parser to calculate the positions of tests statically. - -Related issue: https://github.com/vitest-dev/vscode/issues/133