I\'m trying to debug Jest unit tests using VS Code. I have the following config file settings
\"configurations\": [
{
\"name\": \"Debug Jest Te
I am using launch.json based on https://www.basefactor.com/using-visual-studio-code-to-debug-jest-based-unit-tests article, in particular example https://github.com/Lemoncode/jest-vs-code-debugging-example/blob/master/custom-solution-jest-config-file/01-implemented/.vscode/launch.json
The section of launch.json to debug single test (assuming that the configuration is located in ./config/test/jest.json):
{
"type": "node",
"request": "launch",
"name": "Jest debug current file",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": [
"${fileBasename}",
"-c",
"./config/test/jest.json",
"--verbose",
"-i",
"--no-cache",
//"--watchAll"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}