Skip to content

Commit

Permalink
docs: ide
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 25, 2022
1 parent e904e45 commit 469e95d
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 20 deletions.
14 changes: 9 additions & 5 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export default defineConfig({
{
text: 'Why Vitest',
link: '/guide/why',

},
{
text: 'Getting Started',
Expand All @@ -124,10 +123,7 @@ export default defineConfig({
text: 'Test Filtering',
link: '/guide/filtering',
},
{
text: 'Debugging',
link: '/guide/debugging',
},

{
text: 'In-source testing',
link: '/guide/in-source',
Expand All @@ -136,6 +132,14 @@ export default defineConfig({
text: 'Test Context',
link: '/guide/test-context',
},
{
text: 'IDE Integration',
link: '/guide/ide',
},
{
text: 'Debugging',
link: '/guide/debugging',
},
{
text: 'Comparisons',
link: '/guide/comparisons',
Expand Down
30 changes: 15 additions & 15 deletions docs/guide/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ To debug a test file in VSCode, create the following launch configuration.

```json
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Debug Current Test File",
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
"args": ["run", "${relativeFile}"],
"smartStep": true,
"console": "integratedTerminal"
}
]
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Debug Current Test File",
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
"args": ["run", "${relativeFile}"],
"smartStep": true,
"console": "integratedTerminal"
}
]
}
```

Expand Down
13 changes: 13 additions & 0 deletions docs/guide/ide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# IDE Integrations

## VS Code

<p text-center>
<img src="https://raw.githubusercontent.com/vitest-dev/vscode/main/img/cover.png" w-80>
</p>

We are now providing a official extension for Visual Studio Code to enchance your testing experience with Vitest.

[GitHub](https://github.com/vitest-dev/vscode) | [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=ZixuanChen.vitest-explorer)

![](https://i.ibb.co/bJCbCf2/202203292020.gif)
8 changes: 8 additions & 0 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ You can specify additional CLI options like `--port` or `--https`. For a full li

Learn more about the [Command Line Interface](./cli.md)

## IDE Integrations

We also provided a official extension for Visual Studio Code to enchance your testing experience with Vitest.

[Install from VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=ZixuanChen.vitest-explorer)

Learn more about [IDE Integrations](./ide.md)

## Examples

[@@include](../../../examples/README.md)
Expand Down

0 comments on commit 469e95d

Please sign in to comment.