testing: rework discovery side of testing to new apis

This commit is contained in:
Connor Peet
2021-04-14 17:10:46 -07:00
parent 22dd903084
commit bec017d389
16 changed files with 558 additions and 354 deletions

View File

@@ -335,9 +335,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
: extHostTypes.ExtensionKind.UI;
const test: typeof vscode.test = {
registerTestProvider(provider) {
registerTestController(provider) {
checkProposedApiEnabled(extension);
return extHostTesting.registerTestProvider(provider);
return extHostTesting.registerTestController(provider);
},
createDocumentTestObserver(document) {
checkProposedApiEnabled(extension);
@@ -351,9 +351,12 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
checkProposedApiEnabled(extension);
return extHostTesting.runTests(provider);
},
publishTestResult(results, persist = true) {
createTestItem<T>(options: vscode.TestItemOptions, data?: T) {
return new extHostTypes.TestItemImpl(options.id, options.label, options.uri, data);
},
createTestRunTask() {
checkProposedApiEnabled(extension);
return extHostTesting.publishExtensionProvidedResults(results, persist);
throw new Error('todo');
},
get onDidChangeTestResults() {
checkProposedApiEnabled(extension);
@@ -1256,7 +1259,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
NotebookCellOutput: extHostTypes.NotebookCellOutput,
NotebookCellOutputItem: extHostTypes.NotebookCellOutputItem,
LinkedEditingRanges: extHostTypes.LinkedEditingRanges,
TestItem: extHostTypes.TestItem,
TestItemStatus: extHostTypes.TestItemStatus,
TestResultState: extHostTypes.TestResultState,
TestMessage: extHostTypes.TestMessage,
TestMessageSeverity: extHostTypes.TestMessageSeverity,