@@ -858,7 +858,7 @@ namespace FourSlash {
858858 }
859859 }
860860
861- public verifyCompletionEntryDetails ( entryName : string , expectedText : string , expectedDocumentation ?: string , kind ?: string ) {
861+ public verifyCompletionEntryDetails ( entryName : string , expectedText : string , expectedDocumentation ?: string , kind ?: string , tags ?: ts . JSDocTagInfo [ ] ) {
862862 const details = this . getCompletionEntryDetails ( entryName ) ;
863863
864864 assert ( details , "no completion entry available" ) ;
@@ -872,6 +872,14 @@ namespace FourSlash {
872872 if ( kind !== undefined ) {
873873 assert . equal ( details . kind , kind , this . assertionMessageAtLastKnownMarker ( "completion entry kind" ) ) ;
874874 }
875+
876+ if ( tags !== undefined ) {
877+ assert . equal ( details . tags . length , tags . length , this . messageAtLastKnownMarker ( "QuickInfo tags" ) ) ;
878+ ts . zipWith ( tags , details . tags , ( expectedTag , actualTag ) => {
879+ assert . equal ( expectedTag . name , actualTag . name ) ;
880+ assert . equal ( expectedTag . text , actualTag . text , this . messageAtLastKnownMarker ( "QuickInfo tag " + actualTag . name ) ) ;
881+ } ) ;
882+ }
875883 }
876884
877885 public verifyReferencesAre ( expectedReferences : Range [ ] ) {
@@ -1083,14 +1091,21 @@ namespace FourSlash {
10831091
10841092 public verifyQuickInfoDisplayParts ( kind : string , kindModifiers : string , textSpan : { start : number ; length : number ; } ,
10851093 displayParts : ts . SymbolDisplayPart [ ] ,
1086- documentation : ts . SymbolDisplayPart [ ] ) {
1094+ documentation : ts . SymbolDisplayPart [ ] ,
1095+ tags : ts . JSDocTagInfo [ ]
1096+ ) {
10871097
10881098 const actualQuickInfo = this . languageService . getQuickInfoAtPosition ( this . activeFile . fileName , this . currentCaretPosition ) ;
10891099 assert . equal ( actualQuickInfo . kind , kind , this . messageAtLastKnownMarker ( "QuickInfo kind" ) ) ;
10901100 assert . equal ( actualQuickInfo . kindModifiers , kindModifiers , this . messageAtLastKnownMarker ( "QuickInfo kindModifiers" ) ) ;
10911101 assert . equal ( JSON . stringify ( actualQuickInfo . textSpan ) , JSON . stringify ( textSpan ) , this . messageAtLastKnownMarker ( "QuickInfo textSpan" ) ) ;
10921102 assert . equal ( TestState . getDisplayPartsJson ( actualQuickInfo . displayParts ) , TestState . getDisplayPartsJson ( displayParts ) , this . messageAtLastKnownMarker ( "QuickInfo displayParts" ) ) ;
10931103 assert . equal ( TestState . getDisplayPartsJson ( actualQuickInfo . documentation ) , TestState . getDisplayPartsJson ( documentation ) , this . messageAtLastKnownMarker ( "QuickInfo documentation" ) ) ;
1104+ assert . equal ( actualQuickInfo . tags . length , tags . length , this . messageAtLastKnownMarker ( "QuickInfo tags" ) ) ;
1105+ ts . zipWith ( tags , actualQuickInfo . tags , ( expectedTag , actualTag ) => {
1106+ assert . equal ( expectedTag . name , actualTag . name ) ;
1107+ assert . equal ( expectedTag . text , actualTag . text , this . messageAtLastKnownMarker ( "QuickInfo tag " + actualTag . name ) ) ;
1108+ } ) ;
10941109 }
10951110
10961111 public verifyRenameLocations ( findInStrings : boolean , findInComments : boolean , ranges ?: Range [ ] ) {
@@ -1184,6 +1199,16 @@ namespace FourSlash {
11841199 assert . equal ( ts . displayPartsToString ( actualDocComment ) , docComment , this . assertionMessageAtLastKnownMarker ( "current signature help doc comment" ) ) ;
11851200 }
11861201
1202+ public verifyCurrentSignatureHelpTags ( tags : ts . JSDocTagInfo [ ] ) {
1203+ const actualTags = this . getActiveSignatureHelpItem ( ) . tags ;
1204+
1205+ assert . equal ( actualTags . length , tags . length , this . assertionMessageAtLastKnownMarker ( "signature help tags" ) ) ;
1206+ ts . zipWith ( tags , actualTags , ( expectedTag , actualTag ) => {
1207+ assert . equal ( expectedTag . name , actualTag . name ) ;
1208+ assert . equal ( expectedTag . text , actualTag . text , this . assertionMessageAtLastKnownMarker ( "signature help tag " + actualTag . name ) ) ;
1209+ } ) ;
1210+ }
1211+
11871212 public verifySignatureHelpCount ( expected : number ) {
11881213 const help = this . languageService . getSignatureHelpItems ( this . activeFile . fileName , this . currentCaretPosition ) ;
11891214 const actual = help && help . items ? help . items . length : 0 ;
@@ -3514,6 +3539,10 @@ namespace FourSlashInterface {
35143539 this . state . verifyCurrentSignatureHelpDocComment ( docComment ) ;
35153540 }
35163541
3542+ public currentSignatureHelpTagsAre ( tags : ts . JSDocTagInfo [ ] ) {
3543+ this . state . verifyCurrentSignatureHelpTags ( tags ) ;
3544+ }
3545+
35173546 public signatureHelpCountIs ( expected : number ) {
35183547 this . state . verifySignatureHelpCount ( expected ) ;
35193548 }
@@ -3642,8 +3671,8 @@ namespace FourSlashInterface {
36423671 this . state . verifyRangesWithSameTextAreDocumentHighlights ( ) ;
36433672 }
36443673
3645- public completionEntryDetailIs ( entryName : string , text : string , documentation ?: string , kind ?: string ) {
3646- this . state . verifyCompletionEntryDetails ( entryName , text , documentation , kind ) ;
3674+ public completionEntryDetailIs ( entryName : string , text : string , documentation ?: string , kind ?: string , tags ?: ts . JSDocTagInfo [ ] ) {
3675+ this . state . verifyCompletionEntryDetails ( entryName , text , documentation , kind , tags ) ;
36473676 }
36483677
36493678 /**
@@ -3673,8 +3702,8 @@ namespace FourSlashInterface {
36733702 }
36743703
36753704 public verifyQuickInfoDisplayParts ( kind : string , kindModifiers : string , textSpan : { start : number ; length : number ; } ,
3676- displayParts : ts . SymbolDisplayPart [ ] , documentation : ts . SymbolDisplayPart [ ] ) {
3677- this . state . verifyQuickInfoDisplayParts ( kind , kindModifiers , textSpan , displayParts , documentation ) ;
3705+ displayParts : ts . SymbolDisplayPart [ ] , documentation : ts . SymbolDisplayPart [ ] , tags : ts . JSDocTagInfo [ ] ) {
3706+ this . state . verifyQuickInfoDisplayParts ( kind , kindModifiers , textSpan , displayParts , documentation , tags ) ;
36783707 }
36793708
36803709 public getSyntacticDiagnostics ( expected : string ) {
0 commit comments