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

Instructions to use extension on a CRA project without adding files to the source code #193

Closed arshadhasan closed 1 year ago

arshadhasan commented 3 years ago

The extension does not work with CRA. Adding these commands to settings.json makes both Run and Debug to work.

firsttris commented 3 years ago

You are saying it does not work with CRA, but I'm pretty sure it does work with the provided information.

Didn't it work for you when putting 'npm run test --' in the jest.command?

Your PR also removes important information from the Readme. Which is needed to debug JSX/TSX. Even if this is not connected to the extension. Many don't know it and will blame the extension.

arshadhasan commented 3 years ago

Run works after adding "jestrunner.jestCommand": "npm run test --", same instructions are in the commit.

Debug was not working for me even after adding babel.config.js and jest config. Also, this solution does not add new files to the source code.

I can leave in info about babel and jest config as another option.

domsleee commented 1 year ago

I think the current README covers how to run and debug with CRA, it looks like the content was added in this PR: https://github.com/firsttris/vscode-jest-runner/commit/0fd4dcc2cb39aa6eb00238215c749d820e26e001

Please reopen this if you think otherwise 👍