Created
June 13, 2021 23:54
-
-
Save mauriciodarocha/1aee181d7027f563dbc5de539a01d208 to your computer and use it in GitHub Desktop.
Debug jsx test files in VSCode with Jest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "1 - Debug CRA Tests", | |
"type": "node", | |
"request": "launch", | |
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts", | |
"runtimeArgs": [ | |
"--inspect-brk", | |
"test" | |
], | |
"args": [ | |
"--runInBand", | |
"--no-cache", | |
"--env=jsdom" | |
], | |
"cwd": "${workspaceRoot}", | |
"protocol": "inspector", | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found this at https://stackoverflow.com/questions/45663364/debugging-tests-with-create-react-app-using-typescript-in-vscode-or-chrome/46346929#46346929
This was the only launch.json that worked for me.