Comments (10)
I'm in a similar situation too.
from vscode.
Hi @christophsturm, you may need to run node setup.mjs
first, then append "vitest.enable": true
to .vscode/settings. json
file, and finally reopen VSCode.
from vscode.
that fixes it. now I just need to find out why it does not run in my monorepo.
it would be really helpful if you updated all the sample projects to vitest 1.1.0
from vscode.
I just created a new monorepo, added a vitest.workspace
file, and multiple packages depend on vitest. I can run vitest in the CLI with no problem, at the workspace level and for each package.
I installed this vscode extension and vscode's Testing
tab shows "No tests have been found in this workspace yet" (same as OP).
I added "vitest.enable": true
to .vscode/settings.json
, and restarted vscode. No luck.
What is setup.mjs
?
from vscode.
I just created a new monorepo, added a
vitest.workspace
file, and multiple packages depend on vitest. I can run vitest in the CLI with no problem, at the workspace level and for each package.I installed this vscode extension and vscode's
Testing
tab shows "No tests have been found in this workspace yet" (same as OP).I added
"vitest.enable": true
to.vscode/settings.json
, and restarted vscode. No luck.What is
setup.mjs
?
They refer to this file from the sample project you should use for reproductions
from vscode.
Hi @christophsturm, you may need to run
node setup.mjs
first, then append"vitest.enable": true
to.vscode/settings. json
file, and finally reopen VSCode.
Not working for me. Didn't get any message when the test fails, only the red icon.
This is the output from setup
{
"System": {
"OS": "Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)"
},
"Binaries": {
"Node": {
"version": "20.9.0",
"path": "~/.nvm/versions/node/v20.9.0/bin/node"
},
"Yarn": "Not Found",
"npm": {
"version": "10.2.1",
"path": "~/.nvm/versions/node/v20.9.0/bin/npm"
}
},
"IDEs": {
"VSCode": {
"version": "1.85.1",
"path": "/usr/bin/code"
}
},
"npmPackages": {
"vite": {
"installed": "5.0.11",
"wanted": "^5.0.11"
},
"vitest": {
"installed": "1.1.3",
"wanted": "^1.1.3"
}
}
}
And here is the screenshot of a failing test
from vscode.
I believe this is similar to #198 (comment)
from vscode.
I believe this is similar to #198 (comment)
Yes. It is. Sorry for not finding #198 before commenting.
from vscode.
Successful fixed by blow steps:
clone blow github repo
git clone https://github.com/zxch3n/vitest-ext-basic-example.git
Under project root, run
node setup.mjs
It will Install deps
Update Vitest extension to the latest pre-release version
Unify Vitest settings
Log env info to info.txt
if 'C:\Users\xxxx\AppData\Local\Programs\Microsoft' is not recognized as an internal or external command' error occurred. Modify line 44 of setup.mjs to
`"${code}" --install-extension zixuanchen.vitest-explorer --pre-release --force`
This will fix setup.mjs when vscode installation path contains spaces
Downgrade to v0.2.42
Open/Reload this project in VS Code
Test Vitest extension on this project.
from vscode.
This issue will be resolved when #213 lands.
from vscode.
Related Issues (20)
- No test output when debugging HOT 7
- Vitest failes to start in vscode >=1.90 when using Yarn PnP HOT 14
- Open VSX Registry (VSCodium) forcing outdated version (1.0.0-beta.X) HOT 7
- Vitest failed to start error on .d.ts files with v0.12.4
- Vitest process exited with exit code null HOT 2
- Color indicator of failing tests in Explorer and Tab Bar
- Debugger grinds to a halt with large unrelated files present HOT 1
- Debugging test regression after 0.10.7 HOT 3
- Error: Cannot find module @rollup/rollup-darwin-x64 on MAC with M3 processor HOT 7
- Plugin keeps iterating across port numbers HOT 1
- Errors during tests don't get reported correctly
- Vitest plugin fails to run tests in a monorepo with app-specific config HOT 3
- Crashes with "Cannot find module"
- `Run all Tests` doesn't create any ui/visual elements anymore
- Add "Turn on continous run" option to the right click menu HOT 1
- VS Code IDE with Docker. No tests have been found in this workspace yet. HOT 1
- Vitest plugin fails to run tests in a monorepo with app-specific config HOT 1
- Logs should go to Output pane channel rather than dev console HOT 3
- Update snapshots HOT 4
- Context buttons at wrong line when returning Promise from test HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode.