This is a note-to-self for a Visual Studio Code debug configuration for testing with Jest in Preact projects.
{
"type": "node",
"name": "Debug Preact Tests",
"request": "launch",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--env=jsdom",
"--runInBand",
"--watchAll=false"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
For more information, see the Jest troubleshooting documentation.