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 multiple entries in jestrunner.configPath #371

Open
laurisvan opened this issue Aug 29, 2024 · 1 comment
Open

Support multiple entries in jestrunner.configPath #371

laurisvan opened this issue Aug 29, 2024 · 1 comment

Comments

@laurisvan
Copy link

We are running our project as a monorepo with multiple modules, each having their own Jest configuration. Running tests works awesome, but we always need to change jestrunner.configPath in the root-level, shared .vscode/settings.json.

I wonder if vscode-jest-runner could be made support multiple config paths, so that we would not need to change the configuration whenever running tests from a different package than currently?

@twestendorff
Copy link

I support the idea. We currently have a Jest configuration for unit and one for integration tests in a project. However, I can only configure one in the settings. This means that I can only execute either unit or integration tests using the plugin.

As a workaround: We can create another Jest configuration, so we then have a Jest unit, a Jest integration and another one that combines the properties of both, in particular testMatch. This way we can set the combined file for the plugin jestrunner.configPath and run the tests using CodeLens. However, this only works as long as the settings are not mutually exclusive.

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