vitest-dev / vscode Goto Github PK
View Code? Open in Web Editor NEWVS Code extension for Vitest
Home Page: https://vitest.dev/vscode
License: MIT License
VS Code extension for Vitest
Home Page: https://vitest.dev/vscode
License: MIT License
Great extension! Is it possible to support a monorepo without vitest.config.ts
in the root folder?
Thanks!
Tests show ANSI escape characters instead of colors in vscode on Mac.
It doesn't show the actual colors. Instead the output looks like this:
Unable to find an element by: [data-testid="label-text"]
Ignored nodes: comments, <script />, <style />
�[36m�[39m
�[36m
Thank you @zxch3n and contributors making and maintaining this extension. After the discussion with the team, we are happy to make this extension our official one and maintain it in the org together.
@zxch3n I have sent you the invitation to join the team, if you'd like, you can transfer this repo into the org (ping me to set up the permissions if needed). And you can send PR to fulfill your info in our docs.
Cheers!
Describe the bug
Title. I clicked "Run Tests (Watch Mode)" but I can't find any way to stop it. I had to restart vscode.
To Reproduce
Steps to reproduce the behavior on the example project:
Describe the bug
Vscode say "cannot get vitest version"
log:
[INFO 11:09:51 AM] Error: Cannot get vitest version from "{"cmd":"/Users/orange/ShuDongProjects/aina/community-ui-pc/node_modules/.bin/vitest","args":[]}"
[INFO 11:09:51 AM] process.env.PATH = /usr/bin:/bin:/usr/sbin:/sbin
[INFO 11:09:51 AM] vitest.nodeEnv = null
[INFO 11:09:51 AM] Vitest Workspace [community-ui-pc]: Vitest version = undefined
Environment
(Paste info.txt content generated by the example project)
{
"System": {
"OS": "macOS 12.4"
},
"Binaries": {
"Node": {
"version": "16.15.0",
"path": "~/.nvm/versions/node/v16.15.0/bin/node"
},
"Yarn": {
"version": "1.22.5",
"path": "~/.yarn/bin/yarn"
},
"npm": {
"version": "8.5.5",
"path": "~/.nvm/versions/node/v16.15.0/bin/npm"
}
},
"IDEs": {
"VSCode": {
"version": "1.69.1",
"path": "/usr/local/bin/code"
}
},
"npmPackages": {
"vite": {
"installed": "2.9.14",
"wanted": "^2.9.9"
},
"vitest": {
"installed": "0.12.10",
"wanted": "^0.12.6"
}
}
}
The extension will fail with
Test result not found.
Can you run vitest successfully on this file? Does it need custom option to run?
Does this file contain test case with the same name?
if the following setup is present:
describe('example', () => {
describe('scope 1', () => {
test('potential same name', () => {
...
});
})
describe('scope 2', () => {
test('potential same name', () => {
...
});
})
})
It this a deliberate choice?
Describe the bug
Maybe I didn't use the addon in the correct way? But simply put, the addon is not working at all. After installing it, I saw the testing tab, I saw the little error beside the test, but no matter where I click, the test is not running.
To Reproduce
https://github.com/zxch3n/vitest-ext-basic-example
node setup.mjs
.Expected behavior
It should start testing.
Environment
{
"System": {
"OS": "macOS 12.4"
},
"Binaries": {
"Node": {
"version": "18.2.0",
"path": "~/.nvm/versions/node/v18.2.0/bin/node"
},
"Yarn": {
"version": "1.22.18",
"path": "/usr/local/bin/yarn"
},
"npm": {
"version": "8.9.0",
"path": "~/.nvm/versions/node/v18.2.0/bin/npm"
}
},
"IDEs": {
"VSCode": {
"version": "1.67.2",
"path": "/usr/local/bin/code"
}
},
"npmPackages": {
"vite": {
"installed": "2.9.9",
"wanted": "^2.9.9"
},
"vitest": {
"installed": "0.12.10",
"wanted": "^0.12.6"
}
}
}
Describe the bug
When telling VSC to debug the tests (all of them, a single test, a single file, or a single describe), will result in nothing happening, apart from a log in the debug console saying no test files were found.
To Reproduce
Expected behavior
The tests to run, using the debugger to stop at breakpoints and such
Screenshots
C:\Program Files\nodejs\node.exe .\node_modules\vitest\vitest.mjs vitest D:/projects/Kronos/tests/util/common.test.ts --api 65426
DEV v0.17.1 d:/projects/Kronos
API started at http://localhost:65426
filter: vitest, D:/projects/Kronos/tests/util/common.test.ts
include: **/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}
watch exclude: **/node_modules/**, **/dist/**
No test files found, exiting with code 1
Process exited with code 1
Environment
Additional context
Using the launch.json config to run tests on the open tests file works as expected. I noticed there appears to be an extra vitest
in the command its running in the debug console, which then appears in the filter list. I suspect this is the root of the issue - it's filtering for test files that include "vitest" in their name, which is none of them.
I noticed the extension doesn't pick up on in-source tests. Any chance this feature will be supported in the future. I might be willing to contribute to a PR if I new it wouldn't sit dead in the PR board indefinitely.
It seems it automatically reruns the test file on file save even watch mode is off
To Reproduce
just save the test file
Expected behavior
Should not rerun on save because watch mode is off
Environment
(Paste info.txt content generated by the example project)
vitest.exclude
not working, VSCode UI still show vitest exclude tests
I have settings.json
////////// vitest //////////
"vitest.include": ["**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx,svelte}"],
"vitest.exclude": ["**/node_modules/**", "**/dist/**", "**/cypress/**", "**/.{idea,git,cache,output,temp}/**", "**/ignored.test.ts", "tests/**"],
import { sveltekit } from '@sveltejs/kit/vite';
import path from 'path';
import { configDefaults, defineConfig } from 'vitest/config';
/** @type {import('vite').UserConfig} */
export default defineConfig({
define: {
// Eliminate in-source test code
'import.meta.vitest': 'undefined'
},
test: {
// jest like globals
globals: true,
environment: 'jsdom',
// in-source testing
includeSource: ['src/**/*.{js,ts,svelte}'],
exclude: [...configDefaults.exclude, 'tests'],
// msw setup
setupFiles: ['./src/mocks/setup.ts'],
coverage: {
exclude: ['src/mocks']
},
deps: {
// Put Svelte component here, e.g., inline: [/svelte-multiselect/, /msw/]
inline: [/msw/]
}
},
resolve: {
alias: {
$stores: path.resolve('./src/lib/stores'),
$blocks: path.resolve('./src/lib/blocks')
}
},
envPrefix: ['VITE_', 'CONFY_'],
plugins: [sveltekit()]
});
Describe the bug
Tests that use Vitest's .skipIf (and I presume .runIf) show up failed because "Test result not found.".
To Reproduce
Try for example:
const isDev = true
describe.skipIf(isDev)("suite 1", () => {
test("skipped if isDev", () => {
expect(true).toBe(true)
})
})
describe("suite 2", () => {
test.skipIf(isDev)("also skipped if isDev", () => {
expect(true).toBe(true)
})
})
Expected behavior
Tests like this should not automatically err out.
Ideally they should be ignored or included depending on the result of the condition (perhaps assume that a missing test result means that it was skipped?) - or in the worst case perhaps just treat them like skipped tests?
Screenshots
Environment
Hi, I'm trying to get the extension to run on Windows and I seem to be getting the same "Test result not found" error when running any of the tests.
I did a debug run of a test to see what was running and the output was:
"E:\Program Files\nodejs\node.exe" .\node_modules\vitest\vitest.mjs run /Users/George/frontend-v8/src/composables/__tests__/auth.test.ts --testNamePattern "auth composable should start with a null current user and account" --reporter=default --reporter=json --outputFile C:\Users\George\AppData\Local\Temp\vitest-report-b18l2.json
RUN v0.8.0 c:/Users/George/frontend-v8
Could not read source map for file:///c:/Users/George/frontend-v8/@vite/env: ENOENT: no such file or directory, open 'c:\Users\George\frontend-v8\@vite\env.mjs.map'
⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL src/composables/__tests__/auth.test.ts [ src/composables/__tests__/auth.test.ts ]
Error: No test suite found in file c:/Users/George/frontend-v8/src/composables/__tests__/auth.test.test
❯ runFiles node_modules/vitest/dist/entry.js:870:18
❯ startTests node_modules/vitest/dist/entry.js:880:9
❯ async node_modules/vitest/dist/entry.js:907:7
❯ async withEnv node_modules/vitest/dist/entry.js:504:5
❯ async run node_modules/vitest/dist/entry.js:906:5
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Test Files 1 failed (1)
Tests no tests
Time 5.98s (in thread 0ms, Infinity%)
JSON report written to C:/Users/George/AppData/Local/Temp/vitest-report-b18l2.json
Process exited with code 1
If I run the exact same command within from the Terminal inside VSCode I get the expected result:
"E:\Program Files\nodejs\node.exe" .\node_modules\vitest\vitest.mjs run /Users/George/frontend-v8/src/composables/__tests__/auth.test.ts --testNamePattern "auth composable should start with a null current user and account" --reporter=default --reporter=json --outputFile C:\Users\George\AppData\Local\Temp\vitest-report-b18l2.json
RUN v0.8.0 C:/Users/George/frontend-v8
√ src/composables/__tests__/auth.test.ts (5)
Test Files 1 passed (1)
Tests 1 passed | 4 skipped (5)
Time 2.90s (in thread 3ms, 114416.96%)
JSON report written to C:/Users/George/AppData/Local/Temp/vitest-report-b18l2.json
I'm not sure the if the source map error is relevant (seems to be missing the node_modules
in the path), but it doesn't seem to be finding any tests. I get the same error for each test if I try and do the global run.
Describe the bug
When running tests using the test runner the red bar highlighting the test title is 6 lines too high
To Reproduce
write tests - run tests using VSCode / extensions test runner - have one test fail
Expected behavior
the red bar to highlight the failing tests description
Screenshots
If applicable, add screenshots to help explain your problem.
p.s this screetshot comes midway through a little refactor - don't mind the tests that don't make sense 😅
Environment
(Paste info.txt content generated by the example project)
1.67.2
^0.14.1
v0.2.12
Additional context
There are times when there's an issue within a node_module
package—or indeed we're trying to gain a better understanding of what a package is doing internally—where it would be useful to easily step through the code.
Unfortunately as skipFiles
is hardcoded, it's impossible to enable this.
Would be great if we could override the default skipFiles
setting.
Describe the bug
A clear and concise description of what the bug is.
I installed vitest V0.18.0,and it doesn`t work.
To Reproduce
Steps to reproduce the behavior on the example project:
Expected behavior
work well
Maybe the problem is to run-once or run-watch.
Version 0.2.20
Is your feature request related to a problem? Please describe.
When you have a nested pkg structure like root/frontend/... the extension still tries to find your package.json at root/package.json instead of root/frontend/package.json
Describe the solution you'd like
Make the root path customizable
Describe the bug
Test file cannot be found if the test file or the directory contains uppercase characters.
For example,
If the test file located in Category directory, such as /app/src/components/Category/CategoryContainer.test.js
, the test file cannot be found.
To Reproduce
Click the test button if the test file or the directory contains uppercase characters.
Screenshots
test file and directory setup
Run the test and Test file can not be found and it create a new file located as /app/src/components/category/categorycontainer.test.js
instead.
Expected behavior
Test file can be found and run the test.
Environment
Would be great if this great VSC extension could be added to the Open VSX Registry.
Describe the bug
When trying to debug a specific test block, the debug process just runs all tests in the file on Windows with Yarn.
To Reproduce
Steps to reproduce the behavior on the example project:
yarn install
import { describe, it, expect} from 'vitest';
describe('add', () => {
it ('1 + 1', () => {
expect(1 + 1).toBe(2);
})
it ('2 + 2', () => {
expect(2 + 2).toBe(4);
})
})
Expected behavior
When debugging a specific test, I expect to only run that test
Screenshots
If applicable, add screenshots to help explain your problem.
Shown above: "2 + 2" is being debugged, but the debugger has broken inside "1 + 1"
The full output for the debug test run:
"C:\Program Files\nodejs\node.exe" .\node_modules\vitest\vitest.mjs test D:/vitest-ext-basic-example/add.test.ts -t ""add 2 + 2"" --api 52918
DEV v0.12.10 d:/vitest-ext-basic-example
node_modules/vitest/dist/chunk-vite-node-externalize.464ab3dd.js:10480
API started at http://localhost:52918
node_modules/vitest/dist/chunk-vite-node-externalize.464ab3dd.js:10480
Could not read source map for file:///d:/vitest-ext-basic-example/@vite/env: ENOENT: no such file or directory, open 'd:\vitest-ext-basic-example\@vite\env.mjs.map'
Environment
(Paste info.txt content generated by the example project)
(filled manually, the setup script does not work on Windows either)
Vitest settings updated
'C:\Users\a-typ\AppData\Local\Programs\Microsoft' is not recognized as an internal or external command,
operable program or batch file.
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Currently test results are shown for the entire test as a whole, which for tests that have several expects makes it hard to figure out what actually failed.
It would be better, IMO, to show the failure where it actually happened in the context of the source code, such as is done with Jest Test Explorer or the terminal runner for vitest - see screenshots.
The resolution of the vitest version is dependent on the node_modules
folder. However, with Yarn pnp installs, there is no node_modules
and so the detection of the vitest version fails with Cannot get vitest version from "undefined"
.
It would be great to have this detection algorithm take Yarn pnp installs into account. There are two ways I could see this happening.
.yarn/cache/vitest-npm-0.18.0-a8155f7bdc-20e76b0de9.zip
...
["vitest", [\
["npm:0.18.0", {\
"packageLocation": "./.yarn/cache/vitest-npm-0.18.0-a8155f7bdc-20e76b0de9.zip/node_modules/vitest/",\
"packageDependencies": [\
["vitest", "npm:0.18.0"]\
],\
"linkType": "SOFT"\
}],\
...
I'd be glad to look into this more and see if I can get a PR working, but it would have to be at a later date since I'm well past the Ballmer Peak tonight.
[2022-03-29 10:29:43.348] [exthost] [error] Activating extension ZixuanChen.vitest-explorer failed due to an error:
[2022-03-29 10:29:43.348] [exthost] [error] Error: ENOENT: no such file or directory, open 'C:\c:\Users\andye\Development\notebunker\package.json'
When the extension tries to activate on windows, it ends up duplicating the C:\
drive identifier at the beginning of the path.
Loving this plugin, can't wait to see it evolve.
However, we constantly use snapshots and couldn't figure out how to "update" snapshots via the plugin.
This functionality is coming or does it exist already?
Describe the bug
The test shows error document is not defined
in monorepo only
To Reproduce
I have a monorepo and have a unit test that test a vue component with @vueuse/core
. So the document
is used inside the component.
reproduce repo https://github.com/hunterliu1003/vitest-vscode-poc
code vitest-vscode-poc
vitest plugin show error document is not defined
packages/lib
directlycode vitest-vscode-poc/packages/lib
vitest plugin run test correctly
git clone [email protected]:hunterliu1003/vitest-vscode-poc.git
pnpm i
pnpm test
Expected behavior
The vitest vscode plugin should support monorepo, or I miss some configuration thanks.
Describe the bug
@testing-library/react: 13.1.1
vitest: 0.12.9
When running any test from the plugin the run fails with "SyntaxError: Unexpected token in JSON at position 52".
From the output It appears that the plugin is trying to write invalid JSON to a file and then read it back
JSON report written to /var/folders/nh/f9txjbr50mg66b89_51z2d2w0000gn/T/vitest-report-eqem9.json
JUNIT report written to /var/folders/nh/f9txjbr50mg66b89_51z2d2w0000gn/T/vitest-report-eqem9.json
Done in 1.09s.
Run test failed
SyntaxError: Unexpected token
in JSON at position 52
Hi,
is there an option to run all test from the file by save automatic like in the jest runner?
Describe the bug
While the extension will install, it does not activate automatically. Forcing it to turn on in the settings does not resolve it.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The extension should auto-detect vitest and enable itself. Clicking the green triangles should run tests.
Environment
Additional context
Following up on thread started on Discord. Tried one or two attempted fixes published but the issue remains.
Tried building/testing this repo itself and the same error occurs.
Describe the bug
The extension gives me warnings when I open a project that has no tests.
To Reproduce
vitest
installed.Expected behavior
The extension should not show anything if vitest
is not installed in a project.
Screenshots
Environment
Describe the bug
Test file cannot be found if the directory contains uppercase characters.
Related issue: #54 but it didn't fix if the directory contains uppercase characters.
For example,
If the test file located in Category directory, such as /app/src/components/Category/CategoryContainer.test.js
, the test file cannot be found.
To Reproduce
Click the test button if the directory contains uppercase characters.
Screenshots
test file and directory setup
Run the test and Test file can not be found and it create a new file located as /app/src/components/category/categorycontainer.test.js
instead.
Expected behavior
Test file can be found and run the test.
Environment
Ideally this extension would have ability to rerun tests automatically when I save a spec file.
Currently I have to go and manually click or invoke a vscode command.
I cannot run individual tests if their names contain something in brackets
describe('test', () => {
it('case (e)', () => {
assert.equal(1, 2)
})
})
When I click run test it runs and I see next:
It doesn't work with squared brackets 'case [e]'
It works if I run describe
It works with curly brackets 'case {e}'
It works with empty brackets 'case ()'
Currently the extension is only logging child.stdout when running spawn. All error generated by the spawn command are ignored. Maybe it's good to add also logging for child.stderr
Describe the bug
Running node setup.mjs
as described in https://github.com/zxch3n/vitest-ext-basic-example fails with error message:
`/bin/sh: 1: /mnt/c/Users/niels/AppData/Local/Programs/Microsoft: not found
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] {
code: 'ERR_UNHANDLED_REJECTION'
}`
To Reproduce
npm install yarn -g
Expected behavior
Installation will work as described in https://github.com/zxch3n/vitest-ext-basic-example
Environment
Host Name: DESKTOP-XXXXXX
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: [email protected]
Registered Organization: N/A
Product ID: 00330-80000-00000-AA030
Original Install Date: 3/26/2022, 4:21:27 PM
System Boot Time: 7/14/2022, 2:51:17 AM
System Manufacturer: Dell Inc.
System Model: XPS 15 9570
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2208 Mhz
BIOS Version: Dell Inc. 1.24.0, 3/21/2022
Windows Directory: C:\WINDOWS
System Directory: C:\WINDOWS\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Time Zone: (UTC-08:00) Pacific Time (US & Canada)
Total Physical Memory: 32,502 MB
Available Physical Memory: 8,882 MB
Virtual Memory: Max Size: 52,982 MB
Virtual Memory: Available: 11,552 MB
Virtual Memory: In Use: 41,430 MB
Page File Location(s): C:\pagefile.sys
Domain: WORKGROUP
Logon Server: \DESKTOP-XXXXXX
Hotfix(s): 4 Hotfix(s) Installed.
[01]: KB5013889
[02]: KB5007575
[03]: KB5015814
[04]: KB5016353
Network Card(s): 3 NIC(s) Installed.
[01]: DisplayLink Network Adapter NCM
Connection Name: Ethernet
DHCP Enabled: Yes
DHCP Server: 10.0.0.1
IP address(es)
[01]: 10.0.0.239
[02]: fe80::8199:a49a:663a:8413
[02]: Killer Wireless-n/a/ac 1535 Wireless Network Adapter
Connection Name: Wi-Fi
Status: Media disconnected
[03]: Bluetooth Device (Personal Area Network)
Connection Name: Bluetooth Network Connection
Status: Media disconnected
WSL: Linux DESKTOP-XXXXXXX 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
vitest/0.18.1 linux-x64 node-v18.5.0
For now there isnt a way to set a configuration file for a package inside a monorepo.
Thanks!
At this moment this only works with my-test.test.js but it would be cool to also support .spec
Currently, we cannot tell which workspace a test case belongs to from the test panel easily.
I have the same problem as in this already closed issue #8 tests are working fine on the terminal (separate or VSCode integrated) but the tests are all failing in the extension:
From testing around I found that without any configuration, the result is this
RUN v0.14.1 E:/repos/project
⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯
FAIL test/code.test.ts [ test/code.test.ts ]
Error: No test suite found in file E:/repos/project/test/code.test.ts
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Test Files 1 failed (1)
Tests no tests
Time 1.84s (in thread 0ms, Infinity%)
And with "vitest.commandLine": "yarn test"
, it actually runs the test, but still displays everything as failed (probably because of the bottom part):
RUN v0.14.1 E:/repos/project
⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯
FAIL test/code.test.ts [ test/code.test.ts ]
TypeError: params.map is not a function
...
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Test Files 1 failed (1)
Tests no tests
Time 1.70s (in thread 0ms, Infinity%)
JSON report written to C:/Users/xxx/AppData/Local/Temp/vitest-report-2v2t12.json
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Cannot find test file:///e%3A/repos/project/test/code.test.ts/function01 given no parameters should be defined@2Cannot find test file:///e%3A/repos/project/test/code.test.ts/function01 given no parameters should instantiate@3Cannot find test file:///e%3A/repos/project/test/code.test.ts/function01 given parameters should be defined@5Cannot find test file:///e%3A/repos/project/test/code.test.ts/function01 given parameters should work with parameters@6Cannot find test file:///e%3A/repos/project/test/code.test.ts/function02 should be defined@9Cannot find test file:///e%3A/repos/project/test/code.test.ts/function03 should be defined@11
vite.config.js
import { defineConfig } from 'vite'
export default defineConfig({})
There is also an issue in the vitest repo:
vitest-dev/vitest#1407
The brace-expansion
dependency appears to be missing in 0.1.14
Here is a require stack
[2022-03-30 18:08:37.894] [exthost] [error] Activating extension ZixuanChen.vitest-explorer failed due to an error:
[2022-03-30 18:08:37.894] [exthost] [error] Error: Cannot find module 'brace-expansion'
Require stack:
- /Users/me/.vscode/extensions/zixuanchen.vitest-explorer-0.1.14/node_modules/minimatch/minimatch.js
- /Users/me/.vscode/extensions/zixuanchen.vitest-explorer-0.1.14/out/vscodeUtils.js
- /Users/me/.vscode/extensions/zixuanchen.vitest-explorer-0.1.14/out/TestData.js
- /Users/me/.vscode/extensions/zixuanchen.vitest-explorer-0.1.14/out/discover.js
- /Users/me/.vscode/extensions/zixuanchen.vitest-explorer-0.1.14/out/extension.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
Originally posted by @calebboyd in #11 (comment)
Hi VS Code PM here 👋
We are currently in the process of making the testing story more discoverable in vscode.
As part of that we are writing docs for the VS Code testing framework, and we really like your testing extension and we want to have a section on it.
This is the draft PR microsoft/vscode-docs#5332
Do you have some good docs to point us to that we could reuse? Or would you like to contribute to our PR directly?
Thanks
I reloaded my VSCode window and lost the ability to run tests. I only have a "Go to Test" icon in the left testing pane, and when I right-click the symbol next to the test, I get this menu:
I tried setting the command line to npx vitest
in the extension settings, but that didn't help.
I noticed that you posted a new version yesterday, so that version may be the problem.
VSCode v1.65.2
Describe the bug
Could not start debug with pnpm project than do not has direct vite dependency, and "vitest.commandLine" could not be applied to debug.
To Reproduce
Steps to reproduce the behavior on the example project:
Expected behavior
Successfully run the debug.
Additional context
I tried to use different methods to start vitest in terminal,all the flollwing commands are run successfully.
pnpx vitest
npx vitest
./node_modules/.bin/vitest
but the following command could not run with pnpm:
node ./node_modules/vitest/vitest.mjs
with the same error mentioned previously.
also, I've edited "vitest.commandLine" to different values and it seems have no impact on debug.
Running and watch has no issues.
Possibly a minor change here?
Line 291 in dd70a04
Environment
{
"System": {
"OS": "macOS 12.5"
},
"Binaries": {
"Node": {
"version": "14.16.0",
"path": "/.nvm/versions/node/v14.16.0/bin/node"/.nvm/versions/node/v14.16.0/bin/yarn"
},
"Yarn": {
"version": "1.22.19",
"path": "
},
"npm": {
"version": "6.14.11",
"path": "~/.nvm/versions/node/v14.16.0/bin/npm"
}
},
"IDEs": {
"VSCode": {
"version": "1.69.2",
"path": "/usr/local/bin/code"
}
},
"npmPackages": {
"vite": {
"installed": "2.9.14",
"wanted": "^2.9.9"
},
"vitest": {
"installed": "0.12.10",
"wanted": "^0.12.6"
}
}
}
Describe the bug
The 'Testing' tab, as shown in the extension screenshots, does not show after installation. Whether manually Enabled or not.
To Reproduce
Expected behavior
'Testing' tab available like shown in screenshots.
Environment
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.