diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 90d4b86792f..5aa55934e23 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -365,10 +365,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I const tests: typeof vscode.tests = { createTestController(provider, label, refreshHandler?: (token: vscode.CancellationToken) => Thenable | void) { - if (refreshHandler) { - checkProposedApiEnabled(extension, 'testRefresh'); - } - return extHostTesting.createTestController(provider, label, refreshHandler); }, createTestObserver() { diff --git a/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts b/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts index 14dfb5cfa07..9c8edf4ddc6 100644 --- a/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts +++ b/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts @@ -55,8 +55,6 @@ export const allApiProposals = Object.freeze({ terminalNameChangeEvent: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalNameChangeEvent.d.ts', testCoverage: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testCoverage.d.ts', testObserver: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testObserver.d.ts', - testRefresh: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testRefresh.d.ts', - testSortText: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testSortText.d.ts', textDocumentNotebook: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textDocumentNotebook.d.ts', textSearchProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts', timeline: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.timeline.d.ts', diff --git a/src/vscode-dts/vscode.d.ts b/src/vscode-dts/vscode.d.ts index 8512ca27c93..b3403898723 100644 --- a/src/vscode-dts/vscode.d.ts +++ b/src/vscode-dts/vscode.d.ts @@ -14615,6 +14615,19 @@ declare module 'vscode' { */ resolveHandler?: (item: TestItem | undefined) => Thenable | void; + /** + * If this method is present, a refresh button will be present in the + * UI, and this method will be invoked when it's clicked. When called, + * the extension should scan the workspace for any new, changed, or + * removed tests. + * + * It's recommended that extensions try to update tests in realtime, using + * a {@link FileWatcher} for example, and use this method as a fallback. + * + * @returns A thenable that resolves when tests have been refreshed. + */ + refreshHandler: ((token: CancellationToken) => Thenable | void) | undefined; + /** * Creates a {@link TestRun}. This should be called by the * {@link TestRunProfile} when a request is made to execute tests, and may @@ -14902,6 +14915,13 @@ declare module 'vscode' { */ description?: string; + /** + * A string that should be used when comparing this item + * with other items. When `falsy` the {@link TestItem.label label} + * is used. + */ + sortText?: string | undefined; + /** * Location of the test item in its {@link TestItem.uri uri}. * diff --git a/src/vscode-dts/vscode.proposed.testRefresh.d.ts b/src/vscode-dts/vscode.proposed.testRefresh.d.ts deleted file mode 100644 index 3e35b8f6f0a..00000000000 --- a/src/vscode-dts/vscode.proposed.testRefresh.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -declare module 'vscode' { - - // https://github.com/microsoft/vscode/issues/139737 - - export interface TestController { - /** - * If this method is present, a refresh button will be present in the - * UI, and this method will be invoked when it's clicked. When called, - * the extension should scan the workspace for any new, changed, or - * removed tests. - * - * It's recommended that extensions try to update tests in realtime, using - * a {@link FileWatcher} for example, and use this method as a fallback. - * - * @returns A thenable that resolves when tests have been refreshed. - */ - refreshHandler: ((token: CancellationToken) => Thenable | void) | undefined; - } - - - export namespace tests { - /** - * Creates a new test controller. - * - * @param id Identifier for the controller, must be globally unique. - * @param label A human-readable label for the controller. - * @param refreshHandler A value for {@link TestController.refreshHandler} - * @returns An instance of the {@link TestController}. - */ - export function createTestController(id: string, label: string, refreshHandler?: (token: CancellationToken) => Thenable | void): TestController; - } -} diff --git a/src/vscode-dts/vscode.proposed.testSortText.d.ts b/src/vscode-dts/vscode.proposed.testSortText.d.ts deleted file mode 100644 index 2105eab2c5f..00000000000 --- a/src/vscode-dts/vscode.proposed.testSortText.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -declare module 'vscode' { - - // https://github.com/microsoft/vscode/issues/130882 - - export interface TestItem { - /** - * A string that should be used when comparing this item - * with other items. When `falsy` the {@link TestItem.label label} - * is used. - */ - sortText: string | undefined; - } -}