vscode-jest-runner
vscode-jest-runner copied to clipboard
create jestrunner.configPath mapping
In my project I have multiple different jest config files to different filename endings. Like *.api-spec.ts files use jest-backend-api.json, *.unit-spec.ts files use jest-unit.json.
Is there a possibility to map those, so that I can run them by pressing the run button on each test, and it chooses the correct config file itself.
Currently I use jestrunner.configPath to map to one file. If multiple mapping is not possible, this can be a feature request.
Something like:
{
"jestrunner.configPath": {
"*.api-spec.ts": "jest-backend-api.json",
"*.unit-spec.ts": "jest-unit.json"
}
}
I'm happy to contribute, so just let me know if this is something I can take or it already exists.
This would be amazing, we have 3 different configurations (browser, backend, and e2e), so I'd love to be able to segment by folder
It's not possible at the moment (jestrunner.configPath only accepts a string), but I think it could be added around getJestConfigPath 👍