-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests not runnable on Linux #31
Comments
Experiencing a similar issue on Fedora..
Environment OS: Fedora 36 |
Run |
@md1440 @derekwsgray can you reproduce the issue in this project? https://github.com/zxch3n/vitest-ext-basic-example I installed Fedora 36 and ubuntu virtual machine. But I failed to reproduce this error on the example project above. |
I cloned your test project and the vitest plugins loads, running tests with the plugin fails but succeeds when ran via cli. It throws the following errors in dev tools:
` ERR [Extension Host] Error: Error when running cwd: /home/marc/vitest-ext-basic-example env.PATH: Log: For help, run: pnpm help test`
When trying with my project where the issue first occured, vitest plguin doesn't start at all, it's not showing in Developer Running Extensions and it shows no Err in Dev tools. Activating it manually via settings.json has seemingly no effect, it doesn't seem to start at all. Hope this helps. Let me know if you'd need more assist with testing... |
Addendum: When toggling Vitest Watch Mode via command palette all works fine in your test project. When attempting the same in my project it throws:
|
@md1440 What does your I made a patch in the pre-release version, can you switch to pre-release and check whether it works now? |
In script.test I only call "test": "vitest".. I have updated to the pre-release version and it's throwing the following error in 3 test setups including your cloned sample project which actually did run fine yesterday. .bin/vitest is present in all projects: `Error: Error when running cwd: /home/marc/vitest-ext-basic-example env.PATH: Log: For help, run: pnpm help test` Strange things are happening... |
@md1440 try changing your |
Yes, the tests are still not runnable in that project. The output is just "The test did not record any output" |
@derekwsgray What is your |
Yay! Thank you @zxch3n, that seems to have been the issue for me. Setting the vitest.commandLine to |
Experience the same issue on MacOS with latetst VSCode version, also tried toggle command it says command does not exist.
|
@sujeet-agrahari Can you try reproducing the issue on https://github.com/zxch3n/vitest-ext-basic-example/? |
@zxch3n It worked. Clone and ran that command. Thanks. |
It's empty. I wasn't aware I was supposed to fill that in. However, entering |
@derekwsgray Normally you don't need to fill in that, I thought there might be some misconfigure which would have caused your problem. I made some changes and add a script in https://github.com/zxch3n/vitest-ext-basic-example. Can you try that again? |
|
{
"System": {
"OS": "Linux 5.4 Linux Mint 19.3 (Tricia)"
},
"Binaries": {
"Node": {
"version": "16.13.2",
"path": "~/.nvm/versions/node/v16.13.2/bin/node"
},
"Yarn": {
"version": "1.22.18",
"path": "~/.yarn/bin/yarn"
},
"npm": {
"version": "8.1.2",
"path": "~/.nvm/versions/node/v16.13.2/bin/npm"
}
},
"IDEs": {
"VSCode": {
"version": "1.67.2",
"path": "/usr/bin/code"
}
},
"npmPackages": {
"vite": {
"installed": "2.9.9",
"wanted": "^2.9.9"
},
"vitest": {
"installed": "0.12.9",
"wanted": "^0.12.6"
}
}
} |
Seems like the cause is that the spawned process cannot find node. Is |
Yes, it's set and already contains that path within it. If I edit it to contain only that path, I still get the same error as above. |
@derekwsgray You restart VS Code after settings changes, right? Sorry, I don't have clues why this is happening on your machine, and I failed to reproduce this issue in all my environments. |
Yes, was restarting. |
Was node installed via |
Yes, I use nvm in all my machines |
This looks like a duplicate of #88 |
close as #125 merged |
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.
Screenshots
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.
The text was updated successfully, but these errors were encountered: