Make it easier to run jest tests for single file with vs code #2768
Labels
outdated
scope: testing tools
Issues related to Cypress / Jest / Playwright / Vitest support in Nx
stale
Expected Behavior
Allow me to go into .spec.ts file and press "Run Jest for Current File"
Please describe the behavior you are expecting
Current Behavior
In vs code we can pass in the current file that should be tested.
but I always need to pass in the lib or else jest will run all my tests before the debugger stopping on my file.
This makes it very hard to get started with debugging your libs.
Proposal
we could add a helper method to nx, that will return the lib / app name for the current file.
that way we could pass this in as the lib name in launch.json.
or we could add a test-file command which would do this for us.
Wallaby
I'm also using wallaby, and you have the same problem there, where you first need to specify which lib directory you want to run.
Going forward
If we can discuss what the best solution would be. I will be happy to implement it.
The text was updated successfully, but these errors were encountered: