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
264 stars 124 forks source link

Supporting multiple config paths depending on the test file extension #305

Open sebekz opened 1 year ago

sebekz commented 1 year ago

Current state

I have multiple jest test suite types, each requiring different configuration files. Each suite type has a distinct file extension. For example:

Unfortunately, vscode-jest-runner does not allow setting varying configuration files depending on file mask. I've also been using https://github.com/formulahendry/vscode-code-runner extension and I am able to have distinct configurations set there using the executorMapByGlob setting, i.e.

    "code-runner.executorMapByGlob": {
        "*.e2e.test.ts": "npx jest --config jest.config.e2e.js",
        "*.e2e.test.js": "npx jest --config jest.config.e2e.js",
        "*.int.test.ts": "npx jest --config jest.config.int.js",
        "*.int.test.js": "npx jest --config jest.config.int.js",
        "*.unit.test.ts": "npx jest",
        "*.unit.test.js": "npx jest",
        ...
    },

Expected state

It would be very helpful if one could designate multiple jest config files depending on the extension of the test file being executed.

domsleee commented 11 months ago

Is it the same feature as #309?