vscode
vscode copied to clipboard
How do I use this after installing it?
What do I do next? I can run pnpm run vitest
in terminal and it works, but there is no documentation on how to get this after installing it.
What is not working for you? When you go the test explorer UI, what do you see?
Hi, I have just installed it, just feeding back, might help the docs, might not.
I get nothing in my test explorer.
I am new to node dev, so bear with me, so not sure if my project classes as mono repo, it has a seperate npm / project structure in each folder, /api, /web etc.
I have /api/ with a vitest.config.ts and can run all my tests fine (they are in api/tests/vitest/.test.) from the command line with vitest, just looked to see if could get a UX runner installed. I have /web/ with other code etc
I see the link to the a workspace setup at the bottom of the docs, but not sure if I need to work with that?
I use httpYac in the same /api directory and that shows tests no issue in the explorer.
UPDATE:
I used "Add folder to workspace" in vs (/api folder) and my tests showed up, but when running a test I get -
Test result not found.
At least some progress, but will have leave now and use command line, thanks.
@wickedw did you see that a new extension was published, and the old one was deprecated a couple of days ago? Can you try the new one?
I've been hitting this to ever since I moved away from the deprecated extension. No tests found. Vitest is working though as I can run npx vitest watch
just fine. I'm working with a monorepo and I tried setting up a workspace file but that didn't seem to help.
我遇到了同样的问题,vscode 的日志是这样的:
我在package.json 中增加了一行"vitest":"vitest" 就可以显示了:
{ //... "scripts": { "dev": "vite", "build": "vite build", "test": "vitest" } //... }
改为
{ //... "scripts": { "dev": "vite", "build": "vite build", "test": "vitest", "vitest":"vitest" } //... }
Usage section has been added to the readme. Feedback is welcome.