diff --git a/test-provider-sample/src/extension.ts b/test-provider-sample/src/extension.ts index 00bc39c1..0ca8cadd 100644 --- a/test-provider-sample/src/extension.ts +++ b/test-provider-sample/src/extension.ts @@ -26,7 +26,7 @@ export async function activate(context: vscode.ExtensionContext) { await data.updateFromDisk(test); } - await discoverTests(test.children.all); + await discoverTests(test.children); } if (test.uri && !coveredLines.has(test.uri.toString())) { @@ -83,10 +83,10 @@ export async function activate(context: vscode.ExtensionContext) { }, }; - discoverTests(request.include ?? ctrl.items.all).then(runTestQueue); + discoverTests(request.include ?? ctrl.items).then(runTestQueue); }; - ctrl.createRunConfiguration('Run Tests', vscode.TestRunConfigurationGroup.Run, runHandler, true); + ctrl.createRunProfile('Run Tests', vscode.TestRunProfileGroup.Run, runHandler, true); ctrl.resolveChildrenHandler = async item => { const data = testData.get(item); @@ -152,7 +152,7 @@ function startWatchingWorkspace(controller: vscode.TestController) { data.updateFromDisk(file); } }); - watcher.onDidDelete(uri => controller.items.remove(uri.toString())); + watcher.onDidDelete(uri => controller.items.delete(uri.toString())); const files = await vscode.workspace.findFiles(pattern); for (const file of files) { diff --git a/test-provider-sample/src/testTree.ts b/test-provider-sample/src/testTree.ts index 5a3fb1e4..a4cf152f 100644 --- a/test-provider-sample/src/testTree.ts +++ b/test-provider-sample/src/testTree.ts @@ -45,7 +45,7 @@ export class TestFile { const ascend = (depth: number) => { while (ancestors.length > depth) { const finished = ancestors.pop()!; - finished.item.children.all = finished.children; + finished.item.children.set(finished.children); } };