Skip to content

Commit 24713c9

Browse files
author
Eugene Cheung
authored
chore: add VSCode launch task for debugging Jest tests [skip ci] (#348)
I was asked how to debug the unit tests. This adds a task for use in VSCode so that you can use the debugger with test files (i.e. set breakpoints, stepping through, looking at call stacks and variable states, etc.). Based on the task from https://mattmazzola.medium.com/how-to-debug-jest-tests-with-vscode-48f003c7cb41 --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_
1 parent 7015c0c commit 24713c9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "1.0.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Jest: current file",
8+
"program": "${workspaceFolder}/node_modules/.bin/jest",
9+
"args": [
10+
"${fileBasenameNoExtension}"
11+
],
12+
"console": "integratedTerminal"
13+
}
14+
]
15+
}

0 commit comments

Comments
 (0)