vscode: Monorepo instructions are unclear, samples not working
Describe the bug Currently, there is (some) support for monorepos, but how to actually get extension working for monorepos is unclear.
The monorepo examples in /samples
don’t work out of the box as well.
To Reproduce Steps to reproduce the behavior on the example project:
- Clone this repository
- Open
samples/monorepo
in vscode - Install the extension
- Run pnpm install
- Run all tests from the extension
Expected behavior The tests should run successfully.
Screenshots If applicable, add screenshots to help explain your problem.
Environment
(Paste info.txt content generated by the example project)
{
"System": {
"OS": "macOS 12.3.1"
},
"Binaries": {
"Node": {
"version": "16.14.0",
"path": "~/.nodenv/versions/16.14.0/bin/node"
},
"Yarn": {
"version": "1.22.15",
"path": "~/.nodenv/versions/16.14.0/bin/yarn"
},
"npm": {
"version": "8.3.1",
"path": "~/.nodenv/versions/16.14.0/bin/npm"
}
},
"IDEs": {
"VSCode": {
"version": "1.70.2",
"path": "/opt/homebrew/bin/code"
}
},
"npmPackages": {
"vite": {
"installed": "2.9.15",
"wanted": "^2.9.9"
},
"vitest": {
"installed": "0.12.10",
"wanted": "^0.12.6"
}
}
}
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 11
- Comments: 17 (4 by maintainers)
There is no need to “hope”, you can install it yourself and see if it fixes it for you.
Please, use the latest pre-release version.
The latest version doesn’t support
vitest.commandLine
option.I’ve also been struggling to run my tests which, together, with
vite.config.ts
are located in a subfolder of my repo / workspace. The only thing that seems to work (somewhat) is setting the following in the VSCode workspace settings:or (more or less equivalently)
where the
test
command is defined in the package.json as:Anyway, in both cases vitest then still reports “Test result not found […]” for every single test, even though the verbose test logs do report the test results, e.g.:
What gives?