Skip to content

Commit 88584fd

Browse files
authored
test: Clean up vscode launch file and add vertexai debug config (#9000)
1 parent e99683b commit 88584fd

File tree

1 file changed

+65
-44
lines changed

1 file changed

+65
-44
lines changed

.vscode/launch.json

+65-44
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "AI Unit Tests (node)",
9+
"type": "node",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/node_modules/.bin/_mocha",
12+
"cwd": "${workspaceRoot}/packages/vertexai",
13+
"args": [
14+
"--require",
15+
"ts-node/register",
16+
"--require",
17+
"src/index.node.ts",
18+
"--timeout",
19+
"5000",
20+
"src/**/*.test.ts"
21+
],
22+
"env": {
23+
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}"
24+
},
25+
"sourceMaps": true
26+
},
727
{
828
"type": "node",
929
"request": "launch",
@@ -18,9 +38,9 @@
1838
"${workspaceFolder}/repo-scripts/prune-dts/*.test.ts"
1939
],
2040
"env": {
21-
"TS_NODE_COMPILER_OPTIONS" : "{\"module\":\"commonjs\"}"
41+
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}"
2242
},
23-
"sourceMaps": true,
43+
"sourceMaps": true
2444
},
2545
{
2646
"type": "node",
@@ -30,16 +50,17 @@
3050
"cwd": "${workspaceRoot}/packages/database",
3151
"args": [
3252
"test/{,!(browser)/**/}*.test.ts",
33-
"--file", "src/index.node.ts",
34-
"--config", "../../config/mocharc.node.js",
53+
"--file",
54+
"src/index.node.ts",
55+
"--config",
56+
"../../config/mocharc.node.js"
3557
],
3658
"env": {
37-
"TS_NODE_FILES":true,
59+
"TS_NODE_FILES": true,
3860
"TS_NODE_CACHE": "NO",
39-
"TS_NODE_COMPILER_OPTIONS" : "{\"module\":\"commonjs\"}"
61+
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}"
4062
},
41-
"sourceMaps": true,
42-
"protocol": "inspector"
63+
"sourceMaps": true
4364
},
4465
{
4566
"type": "node",
@@ -48,14 +69,16 @@
4869
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
4970
"cwd": "${workspaceRoot}/packages/firestore",
5071
"args": [
51-
"--require", "babel-register.js",
52-
"--require", "src/index.node.ts",
53-
"--timeout", "5000",
72+
"--require",
73+
"babel-register.js",
74+
"--require",
75+
"src/index.node.ts",
76+
"--timeout",
77+
"5000",
5478
"test/{,!(browser|integration)/**/}*.test.ts",
5579
"--exit"
5680
],
57-
"sourceMaps": true,
58-
"protocol": "inspector"
81+
"sourceMaps": true
5982
},
6083
{
6184
"type": "node",
@@ -64,18 +87,21 @@
6487
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
6588
"cwd": "${workspaceRoot}/packages/firestore",
6689
"args": [
67-
"--require", "babel-register.js",
68-
"--require", "index.node.ts",
69-
"--require", "test/util/node_persistence.ts",
70-
"--timeout", "5000",
90+
"--require",
91+
"babel-register.js",
92+
"--require",
93+
"index.node.ts",
94+
"--require",
95+
"test/util/node_persistence.ts",
96+
"--timeout",
97+
"5000",
7198
"test/{,!(browser|integration)/**/}*.test.ts",
7299
"--exit"
73100
],
74101
"env": {
75102
"USE_MOCK_PERSISTENCE": "YES"
76103
},
77-
"sourceMaps": true,
78-
"protocol": "inspector"
104+
"sourceMaps": true
79105
},
80106
{
81107
"type": "node",
@@ -84,17 +110,19 @@
84110
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
85111
"cwd": "${workspaceRoot}/packages/firestore",
86112
"args": [
87-
"--require", "babel-register.js",
88-
"--require", "index.node.ts",
89-
"--timeout", "5000",
113+
"--require",
114+
"babel-register.js",
115+
"--require",
116+
"index.node.ts",
117+
"--timeout",
118+
"5000",
90119
"test/{,!(browser|unit)/**/}*.test.ts",
91120
"--exit"
92121
],
93122
"env": {
94-
"FIRESTORE_TARGET_BACKEND" : "emulator",
123+
"FIRESTORE_TARGET_BACKEND": "emulator"
95124
},
96-
"sourceMaps": true,
97-
"protocol": "inspector"
125+
"sourceMaps": true
98126
},
99127
{
100128
"type": "node",
@@ -103,45 +131,38 @@
103131
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
104132
"cwd": "${workspaceRoot}/packages/firestore",
105133
"args": [
106-
"--require", "babel-register.js",
107-
"--require", "index.node.ts",
108-
"--require", "test/util/node_persistence.ts",
109-
"--timeout", "5000",
134+
"--require",
135+
"babel-register.js",
136+
"--require",
137+
"index.node.ts",
138+
"--require",
139+
"test/util/node_persistence.ts",
140+
"--timeout",
141+
"5000",
110142
"test/{,!(browser|unit)/**/}*.test.ts",
111143
"--exit"
112144
],
113145
"env": {
114146
"USE_MOCK_PERSISTENCE": "YES",
115-
"FIRESTORE_TARGET_BACKEND" : "emulator",
147+
"FIRESTORE_TARGET_BACKEND": "emulator"
116148
},
117-
"sourceMaps": true,
118-
"protocol": "inspector"
149+
"sourceMaps": true
119150
},
120151
{
121152
"type": "node",
122153
"request": "launch",
123154
"name": "Firestore Unit Tests (Browser)",
124155
"program": "${workspaceRoot}/node_modules/.bin/karma",
125156
"cwd": "${workspaceRoot}/packages/firestore",
126-
"args": [
127-
"start",
128-
"--auto-watch",
129-
"--unit",
130-
"--browsers", "Chrome"
131-
]
157+
"args": ["start", "--auto-watch", "--unit", "--browsers", "Chrome"]
132158
},
133159
{
134160
"type": "node",
135161
"request": "launch",
136162
"name": "Firestore Integration Tests (Browser)",
137163
"program": "${workspaceRoot}/node_modules/.bin/karma",
138164
"cwd": "${workspaceRoot}/packages/firestore",
139-
"args": [
140-
"start",
141-
"--auto-watch",
142-
"--integration",
143-
"--browsers", "Chrome"
144-
]
165+
"args": ["start", "--auto-watch", "--integration", "--browsers", "Chrome"]
145166
}
146167
]
147168
}

0 commit comments

Comments
 (0)