diff --git a/src/vs/workbench/api/common/extHostTesting.ts b/src/vs/workbench/api/common/extHostTesting.ts index 5e2e6f1bc19..d17a5a2c76a 100644 --- a/src/vs/workbench/api/common/extHostTesting.ts +++ b/src/vs/workbench/api/common/extHostTesting.ts @@ -138,10 +138,12 @@ export class ExtHostTesting implements ExtHostTestingShape { createTestRun: (request, name, persist = true) => { return this.runTracker.createTestRun(controllerId, collection, request, name, persist); }, - invalidateTestResults: item => { + invalidateTestResults: items => { checkProposedApiEnabled(extension, 'testInvalidateResults'); - const id = item ? TestId.fromExtHostTestItem(item, controllerId).toString() : controllerId; - return this.proxy.$markTestRetired(id); + for (const item of items instanceof Array ? items : [items]) { + const id = item ? TestId.fromExtHostTestItem(item, controllerId).toString() : controllerId; + this.proxy.$markTestRetired(id); + } }, set resolveHandler(fn) { collection.resolveHandler = fn; diff --git a/src/vscode-dts/vscode.proposed.testInvalidateResults.d.ts b/src/vscode-dts/vscode.proposed.testInvalidateResults.d.ts index 35f955c2f4d..87d21c13c16 100644 --- a/src/vscode-dts/vscode.proposed.testInvalidateResults.d.ts +++ b/src/vscode-dts/vscode.proposed.testInvalidateResults.d.ts @@ -25,6 +25,6 @@ declare module 'vscode' { * * @param item Item to mark as outdated. If undefined, all the controller's items are marked outdated. */ - invalidateTestResults(item?: TestItem): void; + invalidateTestResults(items?: TestItem | readonly TestItem[]): void; } }