Skip to content
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

Doesn't work with workspaces or sub dependencies #30

Open
DrSammyD opened this issue Jul 18, 2023 · 2 comments
Open

Doesn't work with workspaces or sub dependencies #30

DrSammyD opened this issue Jul 18, 2023 · 2 comments

Comments

@DrSammyD
Copy link

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.

@seannetlife
Copy link

seannetlife commented Dec 22, 2023

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

@benelan
Copy link
Contributor

benelan commented Dec 19, 2024

@DrSammyD @seannetlife I was having monorepo issues too, which I fixed with #70. Can you test my fork to see if the changes resolve your issues as well?

Just change marilari88/neotest-vitest to benelan/neotest-vitest where you install/configure the adapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants