quolpr / quicktest.nvim

Run your tests in split window or popup with live feedback
MIT License
77 stars 5 forks source link

Make `cwd` configurable per adapter #12

Closed flunderpero closed 2 months ago

flunderpero commented 2 months ago

I have a monorepo and need my vitest files to be run at the project root. Because currently the adapter searches for the next package.json up the path, it is run in the package directory, not project root.

I think this might be a common problem with monorepos. In my case the solution would be to search for vite.config.ts instead of package.json but that might not be always the case, so having cwd as a configurable function would be great.

quolpr commented 2 months ago

Thanks for the issue! This commit should fix it https://github.com/quolpr/quicktest.nvim/commit/cb5d6c84b4633ca86bd60d484ab6b1d3dc2b6f9b