testing: update to latest api

This commit is contained in:
Connor Peet
2021-07-16 13:09:31 -07:00
parent dcbf3a4f50
commit 547dd0bb35
2 changed files with 5 additions and 5 deletions

View File

@ -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) {

View File

@ -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);
}
};