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

Support for multi-root workspaces? #59

Open
pfaffle opened this issue Dec 13, 2024 · 3 comments
Open

Support for multi-root workspaces? #59

pfaffle opened this issue Dec 13, 2024 · 3 comments

Comments

@pfaffle
Copy link

pfaffle commented Dec 13, 2024

I have a monorepo setup which uses a VS Code Multi-root Workspace. In this project I have two subprojects, one for a backend NodeJS service and one for a React UI. I use node's test runner for the backend project but for the UI tests I use other tools. My project setup in case it helps: https://github.com/pfaffle/armada-analyzer/blob/main/armada-analyzer.code-workspace

At the moment, the extension detects my backend tests twice, once as a subdirectory of the root project and once as a subdirectory of the "service" project which is a bit confusing and unnecessary.
image

I would like to be able to configure this extension on a per-subproject level and use it only for the backend subproject and disable it for the UI one and for the root project (which has no code of its own). Is there a good way to do that now? VS Code only seems to allow me to configure it in the root project.

@connor4312
Copy link
Owner

You could set "nodejs-testing.extensions": [] in the folder you want to disable it in (in .vscode/settings.json within that folder)

@pfaffle
Copy link
Author

pfaffle commented Dec 14, 2024

I added

{ "nodejs-testing.extensions": [] }

to /.vscode/settings.json in the subproject folder, but VS Code says that it won't apply here:

image

@pfaffle
Copy link
Author

pfaffle commented Dec 16, 2024

I'm able to get the behavior I want if I set

"nodejs-testing.include": ["./dist/tests"]

in my root workspace's config, because the only project where that's a valid path is the one I want it to scan, but I can see that it's actually applying that setting to each workspace in my project individually because if I create tests under that path in one of the other workspace directories, they show up too in VS Code.

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

2 participants