firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
265 stars 124 forks source link

Default jest config file resolution not supported #354

Open lisadean opened 6 months ago

lisadean commented 6 months ago

Jest supports a customized configuration through several methods (https://jestjs.io/docs/configuration) and this config resolution is ignored in favor of an override through the extension's settings, or a fallback to just walking up the tree until a config file is found. This means that configuration (such as globalSetup) done in a root config file is ignored when you also have Jest project config files present.

https://github.com/firsttris/vscode-jest-runner/blob/81b797c77eb23fbc5c07a8a953a57b15edf0685a/src/jestRunnerConfig.ts#L84

Instead, the extension should only specify a config file if there is a jestrunner.configPath value defined.

This is similar to this issue: https://github.com/firsttris/vscode-jest-runner/issues/220

firsttris commented 6 months ago

Thanks for your message, you are absolutly correct, we need to change this.