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.
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