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

feat: Add workspace root substitution for docker containers #335

Open domsleee opened 10 months ago

domsleee commented 10 months ago

Suggested feature for #199

It is a proof of concept of a way of transforming the test file path, that could be used in a docker container

For example, instead of this:

node 'node_modules/.bin/jest' '/Users/user/git/vscode-jest-runner/examples.test.ts' -t 'Example'

With testPathSubstitution as /app/container (i.e. a replacement of the workspace root):

node 'node_modules/.bin/jest' '/app/container/examples.test.ts' -t 'Example'

With testPathSubstitution as ./ (i.e. relative to workspace root):

node 'node_modules/.bin/jest' './examples.test.ts' -t 'Example'
firsttris commented 6 months ago

Let me know when you want to merge this because it's still in draft

firsttris commented 6 months ago

you also have to permission to merge on your own.