neotest-vitest icon indicating copy to clipboard operation
neotest-vitest copied to clipboard

Doesn't work with workspaces or sub dependencies

Open DrSammyD opened this issue 1 year ago • 1 comments

Tried using with a workspace based mono repo. I had to delete the package.json dependency checks in my fork to get this plugin to work. May want to refactor how you determine if vitest is actually being used. Package sniffing seems like a suboptimal method.

Perhaps just traversing up the tree till you get to the root project and inspecting the node_modules for a vitest folder would be more robust.

DrSammyD avatar Jul 18 '23 06:07 DrSammyD

Could you please share your workaround?

For reference, here is my workspace folder config:

|- packages
|  |- foo
|     |- src
|     |  |- my-tests.test.ts
|     |- package.json (does NOT contain vitest dependency)
|
|- package.json (contains vitest dependency)
|- vite.config.ts
|- vitest.setup.js

seannetlife avatar Dec 22 '23 11:12 seannetlife