Steps to Reproduce:
test
scripts and eventually fires a timeouttest
scripts and properly attaches to the debuggerNote: the changelog for 1.19 mentions new additions on the debugging experience: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#debugging-tests-in-visual-studio-code
I'll post the same issue on Create React App since it seems to be tightly related:
https://github.com/facebookincubator/create-react-app/issues/3602
Reproduces without extensions: Yes
The launch config at https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#debugging-tests-in-visual-studio-code is wrong (but it worked by accident because VS Code had a bug in previous versions).
Just try this:
{
"name": "Debug CRA Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts",
"args": [
"test",
"--runInBand",
"--no-cache",
"--env=jsdom"
],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
Thanks for the swift response @weinand. The configuration above worked fine with VS Code 1.19.
I'll update the related issue on Create React App to update the documentation accordingly.
@amadeogallardo that configuration should work fine for all versions of VS Code.
Most helpful comment
@amadeogallardo that configuration should work fine for all versions of VS Code.