Skip to content

Commit 94511c2

Browse files
Add debug config and workspace
1 parent 8ffd5a2 commit 94511c2

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.vscode/launch.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"configurations": [
3+
{
4+
"args": [
5+
"${relativeFile}",
6+
"--runInBand"
7+
],
8+
"console": "integratedTerminal",
9+
"cwd": "${workspaceFolder}/${input:workspace}",
10+
"disableOptimisticBPs": true,
11+
"internalConsoleOptions": "neverOpen",
12+
"name": "Debug current test file (pick workspace)",
13+
"program": "${workspaceFolder}/node_modules/.bin/jest",
14+
"request": "launch",
15+
"runtimeArgs": [
16+
"run",
17+
"test:unit",
18+
"--"
19+
],
20+
"runtimeExecutable": "npm",
21+
"type": "node"
22+
},
23+
{
24+
"args": [
25+
"${relativeFile}",
26+
"--runInBand",
27+
"--testNamePattern",
28+
"${input:testName}"
29+
],
30+
"console": "integratedTerminal",
31+
"cwd": "${workspaceFolder}/${input:workspace}",
32+
"disableOptimisticBPs": true,
33+
"internalConsoleOptions": "neverOpen",
34+
"name": "Debug single test by name (pick workspace)",
35+
"program": "${workspaceFolder}/node_modules/.bin/jest",
36+
"request": "launch",
37+
"runtimeArgs": [
38+
"run",
39+
"test:unit",
40+
"--"
41+
],
42+
"runtimeExecutable": "npm",
43+
"type": "node"
44+
}
45+
],
46+
"inputs": [
47+
{
48+
"description": "Select package workspace to run tests in",
49+
"id": "workspace",
50+
"options": [
51+
"lambdas/api-handler",
52+
"lambdas/authorizer",
53+
"internal/datastore"
54+
],
55+
"type": "pickString"
56+
},
57+
{
58+
"description": "Enter test name regex for --testNamePattern",
59+
"id": "testName",
60+
"type": "promptString"
61+
}
62+
],
63+
"version": "0.0.1"
64+
}

project.code-workspace

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
{
3636
"name": "Dev Container",
3737
"path": ".devcontainer"
38+
},
39+
{
40+
"name": "Lambdas Api Handler",
41+
"path": "./lambdas/api-handler"
3842
}
3943
],
4044
"settings": {

0 commit comments

Comments
 (0)