Skip to content

Instantly share code, notes, and snippets.

@antonpegov
Last active June 9, 2021 13:04
Show Gist options
  • Save antonpegov/024afecfc0c79bd010c9f515e97e82c1 to your computer and use it in GitHub Desktop.
Save antonpegov/024afecfc0c79bd010c9f515e97e82c1 to your computer and use it in GitHub Desktop.
launch.json to anable jest tests debugging in VSCode
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug CRA Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts",
"args": ["test", "--runInBand", "--no-cache", "--watchAll=false"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": { "CI": "true" },
"disableOptimisticBPs": true
},
{
"name": "Debug opened file",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts",
"args": ["test", "${fileBasenameNoExtension}", "--runInBand", "--no-cache", "--watchAll"],
"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