Last active
October 24, 2022 09:33
-
-
Save danyg/b1cd0ffc55c222cc8a781c55d763b818 to your computer and use it in GitHub Desktop.
VSCode JEST debug current file
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
[ | |
// USING jest for common configs | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest watch current test", | |
"cwd": "${workspaceFolder}", | |
"runtimeArgs": [ | |
"--inspect", | |
"${workspaceRoot}/node_modules/.bin/jest", | |
"--runInBand", // necessary for typescript compilation cache propuses | |
"--watch", | |
"${relativeFile}" // will run current test file | |
], | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen" | |
}, | |
// USING npm test for custom configurations | |
{ | |
"name": "Jest watch current test", | |
"type": "node", | |
"request": "launch", | |
"cwd": "${workspaceRoot}", | |
"runtimeExecutable": "npm", | |
"runtimeArgs": [ | |
"test", | |
"--runInBand", // necessary for typescript compilation cache propuses | |
"--watch", | |
"${relativeFile}" // will run current test file | |
], | |
"console": "integratedTerminal" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment