mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
testing: update to latest api
This commit is contained in:
@ -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) {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user