Skip to content

Commit 6524cda

Browse files
committed
chore: debug api
1 parent 785de7f commit 6524cda

File tree

10 files changed

+592
-82
lines changed

10 files changed

+592
-82
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
"@types/glob": "^7.2.0",
164164
"@types/micromatch": "^4.0.6",
165165
"@types/node": "^18.11.18",
166+
"@types/node-ipc": "^9.2.3",
166167
"@types/semver": "^7.3.9",
167168
"@types/vscode": "^1.77.0",
168169
"@types/ws": "^8.5.10",
@@ -182,6 +183,7 @@
182183
"glob": "^7.2.0",
183184
"micromatch": "^4.0.5",
184185
"mighty-promise": "^0.0.8",
186+
"node-ipc": "^11.1.0",
185187
"pathe": "^1.1.2",
186188
"semver": "^7.3.5",
187189
"tree-kill": "^1.2.2",

pnpm-lock.yaml

Lines changed: 172 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/TestData.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,24 +88,24 @@ export class TestFile {
8888
pattern = ''
8989
children: (TestDescribe | TestCase)[] = []
9090
constructor(public item: vscode.TestItem) {}
91-
public async updateFromDisk(controller: vscode.TestController) {
91+
public async updateFromDisk(controller: vscode.TestController, folder?: vscode.WorkspaceFolder) {
9292
const item = this.item
9393
try {
9494
const content = await getContentFromFilesystem(item.uri!)
9595
this.item.error = undefined
96-
discoverTestFromFileContent(controller, content, item, this)
96+
discoverTestFromFileContent(controller, content, item, this, folder || WEAKMAP_TEST_FOLDER.get(item)!)
9797
this.resolved = true
9898
}
9999
catch (e) {
100100
this.item.error = (e as Error).stack
101101
}
102102
}
103103

104-
load(ctrl: vscode.TestController): Promise<void> | undefined {
104+
load(ctrl: vscode.TestController, folder: vscode.WorkspaceFolder): Promise<void> | undefined {
105105
if (this.resolved)
106106
return
107107

108-
return this.updateFromDisk(ctrl)
108+
return this.updateFromDisk(ctrl, folder)
109109
}
110110

111111
getFullPattern(): string {

0 commit comments

Comments
 (0)