mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
testing: allow invalidateTestResults to take an array (#183569)
This commit is contained in:
parent
1942c0eccc
commit
d15a0aa70c
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue