Created
May 12, 2020 13:18
-
-
Save inigomarquinez/061ad2fa66264d27f60fe5de31e911e0 to your computer and use it in GitHub Desktop.
How to configure Visual Studio Code for Jest test debugging
This file contains 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
Show hidden characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
// Configuration used to debug the application (default configuration created by Visual Studio Code ) | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Program", | |
"skipFiles": [ | |
"<node_internals>/**" | |
], | |
"program": "${workspaceFolder}/index.js" | |
}, | |
// Configuration used to debug all the tests | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest All", | |
"program": "${workspaceFolder}/node_modules/.bin/jest", | |
"args": [ | |
"--runInBand" | |
], | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"disableOptimisticBPs": true, | |
"windows": { | |
"program": "${workspaceFolder}/node_modules/jest/bin/jest", | |
} | |
}, | |
// Configuration used to debug tests in the current file | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest Current File", | |
"program": "${workspaceFolder}/node_modules/.bin/jest", | |
"args": [ | |
"${fileBasenameNoExtension}", | |
], | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"disableOptimisticBPs": true, | |
"windows": { | |
"program": "${workspaceFolder}/node_modules/jest/bin/jest", | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment