Skip to content

Commit 4fca6c9

Browse files
author
Michael Wegman
committed
chore(jest): enable jest debugging in vs code
1 parent e7293e9 commit 4fca6c9

File tree

2 files changed

+43
-19
lines changed

2 files changed

+43
-19
lines changed

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"locals": ["module"]
2929
}]
3030
}]]
31+
},
32+
"test": {
33+
"retainLines": true,
34+
"sourceMaps": "inline"
3135
}
3236
}
3337
}

.vscode/launch.json

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,45 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7-
{
8-
"type": "node",
9-
"request": "launch",
10-
"name": "Jest Debugger",
11-
"port": 9229,
12-
"address": "localhost",
13-
"stopOnEntry": false,
14-
"runtimeExecutable": null,
15-
"runtimeArgs": [
16-
"--inspect-brk",
17-
"./node_modules/.bin/jest", // Path to Jest
18-
"-i",
19-
"--config=jest.config.json"
20-
],
21-
"env": {
22-
"TZ": "utc"
23-
},
24-
"cwd": "${workspaceRoot}",
25-
"sourceMaps": true
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Jest All",
11+
"program": "${workspaceFolder}/node_modules/.bin/jest",
12+
"env": {
13+
"TZ": "utc"
14+
},
15+
"args": [
16+
"--config=jest.config.json",
17+
"--runInBand"
18+
],
19+
"console": "integratedTerminal",
20+
"internalConsoleOptions": "neverOpen",
21+
"windows": {
22+
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
2623
}
24+
},
25+
{
26+
"type": "node",
27+
"request": "launch",
28+
"name": "Jest Current File",
29+
"program": "${workspaceFolder}/node_modules/.bin/jest",
30+
"env": {
31+
"TZ": "utc"
32+
},
33+
"args": [
34+
"--config=jest.config.json",
35+
"--runInBand",
36+
"--no-cache",
37+
"--verbose",
38+
"-i",
39+
"${relativeFile}"
40+
],
41+
"console": "integratedTerminal",
42+
"internalConsoleOptions": "neverOpen",
43+
"windows": {
44+
"program": "${workspaceFolder/node_modules/jest/bin/jest",
45+
},
46+
}
2747
]
2848
}

0 commit comments

Comments
 (0)