@@ -266,9 +266,9 @@ export class TestControllerManager {
266266 }
267267 testItem . label = ri . label ;
268268 testItem . error = ri . error ;
269- // TODO: Tags
270- // const tags = this.convertTags(ri.tags);
271- // if (tags) testItem.tags = tags;
269+
270+ const tags = this . convertTags ( ri . tags ) ;
271+ if ( tags ) testItem . tags = tags ;
272272
273273 await this . refreshItem ( testItem ) ;
274274 }
@@ -315,9 +315,9 @@ export class TestControllerManager {
315315 testItem . canResolveChildren = ri . children !== undefined && ri . children . length > 0 ;
316316 testItem . label = ri . label ;
317317 testItem . error = ri . error ;
318- // TODO: Tags
319- // const tags = this.convertTags(ri.tags);
320- // if (tags) testItem.tags = tags;
318+
319+ const tags = this . convertTags ( ri . tags ) ;
320+ if ( tags ) testItem . tags = tags ;
321321
322322 await this . refreshItem ( testItem ) ;
323323 }
@@ -338,24 +338,23 @@ export class TestControllerManager {
338338 }
339339 }
340340
341- // TODO: Tags
342- // private testTags = new WeakValueMap<string, vscode.TestTag>();
341+ private testTags = new WeakValueMap < string , vscode . TestTag > ( ) ;
343342
344- // private convertTags(tags: string[] | undefined): vscode.TestTag[] | undefined {
345- // if (tags === undefined) return undefined;
343+ private convertTags ( tags : string [ ] | undefined ) : vscode . TestTag [ ] | undefined {
344+ if ( tags === undefined ) return undefined ;
346345
347- // const result: vscode.TestTag[] = [];
346+ const result : vscode . TestTag [ ] = [ ] ;
348347
349- // for (const tag of tags) {
350- // if (!this.testTags.has(tag)) {
351- // this.testTags.set(tag, new vscode.TestTag(tag));
352- // }
353- // const vstag = this.testTags.get(tag);
354- // if (vstag !== undefined) result.push(vstag);
355- // }
348+ for ( const tag of tags ) {
349+ if ( ! this . testTags . has ( tag ) ) {
350+ this . testTags . set ( tag , new vscode . TestTag ( tag ) ) ;
351+ }
352+ const vstag = this . testTags . get ( tag ) ;
353+ if ( vstag !== undefined ) result . push ( vstag ) ;
354+ }
356355
357- // return result;
358- // }
356+ return result ;
357+ }
359358
360359 private readonly refreshFromUriMutex = new Mutex ( ) ;
361360
0 commit comments