@@ -854,7 +854,7 @@ namespace FourSlash {
854854 }
855855 }
856856
857- public verifyCompletionEntryDetails ( entryName : string , expectedText : string , expectedDocumentation ?: string , kind ?: string ) {
857+ public verifyCompletionEntryDetails ( entryName : string , expectedText : string , expectedDocumentation ?: string , kind ?: string , tags ?: ts . JSDocTagInfo [ ] ) {
858858 const details = this . getCompletionEntryDetails ( entryName ) ;
859859
860860 assert ( details , "no completion entry available" ) ;
@@ -868,6 +868,14 @@ namespace FourSlash {
868868 if ( kind !== undefined ) {
869869 assert . equal ( details . kind , kind , this . assertionMessageAtLastKnownMarker ( "completion entry kind" ) ) ;
870870 }
871+
872+ if ( tags !== undefined ) {
873+ assert . equal ( details . tags . length , tags . length , this . messageAtLastKnownMarker ( "QuickInfo tags" ) ) ;
874+ ts . zipWith ( tags , details . tags , ( expectedTag , actualTag ) => {
875+ assert . equal ( expectedTag . name , actualTag . name ) ;
876+ assert . equal ( expectedTag . text , actualTag . text , this . messageAtLastKnownMarker ( "QuickInfo tag " + actualTag . name ) ) ;
877+ } ) ;
878+ }
871879 }
872880
873881 public verifyReferencesAre ( expectedReferences : Range [ ] ) {
@@ -1076,14 +1084,21 @@ namespace FourSlash {
10761084
10771085 public verifyQuickInfoDisplayParts ( kind : string , kindModifiers : string , textSpan : { start : number ; length : number ; } ,
10781086 displayParts : ts . SymbolDisplayPart [ ] ,
1079- documentation : ts . SymbolDisplayPart [ ] ) {
1087+ documentation : ts . SymbolDisplayPart [ ] ,
1088+ tags : ts . JSDocTagInfo [ ]
1089+ ) {
10801090
10811091 const actualQuickInfo = this . languageService . getQuickInfoAtPosition ( this . activeFile . fileName , this . currentCaretPosition ) ;
10821092 assert . equal ( actualQuickInfo . kind , kind , this . messageAtLastKnownMarker ( "QuickInfo kind" ) ) ;
10831093 assert . equal ( actualQuickInfo . kindModifiers , kindModifiers , this . messageAtLastKnownMarker ( "QuickInfo kindModifiers" ) ) ;
10841094 assert . equal ( JSON . stringify ( actualQuickInfo . textSpan ) , JSON . stringify ( textSpan ) , this . messageAtLastKnownMarker ( "QuickInfo textSpan" ) ) ;
10851095 assert . equal ( TestState . getDisplayPartsJson ( actualQuickInfo . displayParts ) , TestState . getDisplayPartsJson ( displayParts ) , this . messageAtLastKnownMarker ( "QuickInfo displayParts" ) ) ;
10861096 assert . equal ( TestState . getDisplayPartsJson ( actualQuickInfo . documentation ) , TestState . getDisplayPartsJson ( documentation ) , this . messageAtLastKnownMarker ( "QuickInfo documentation" ) ) ;
1097+ assert . equal ( actualQuickInfo . tags . length , tags . length , this . messageAtLastKnownMarker ( "QuickInfo tags" ) ) ;
1098+ ts . zipWith ( tags , actualQuickInfo . tags , ( expectedTag , actualTag ) => {
1099+ assert . equal ( expectedTag . name , actualTag . name ) ;
1100+ assert . equal ( expectedTag . text , actualTag . text , this . messageAtLastKnownMarker ( "QuickInfo tag " + actualTag . name ) ) ;
1101+ } ) ;
10871102 }
10881103
10891104 public verifyRenameLocations ( findInStrings : boolean , findInComments : boolean , ranges ?: Range [ ] ) {
@@ -1177,6 +1192,16 @@ namespace FourSlash {
11771192 assert . equal ( ts . displayPartsToString ( actualDocComment ) , docComment , this . assertionMessageAtLastKnownMarker ( "current signature help doc comment" ) ) ;
11781193 }
11791194
1195+ public verifyCurrentSignatureHelpTags ( tags : ts . JSDocTagInfo [ ] ) {
1196+ const actualTags = this . getActiveSignatureHelpItem ( ) . tags ;
1197+
1198+ assert . equal ( actualTags . length , tags . length , this . assertionMessageAtLastKnownMarker ( "signature help tags" ) ) ;
1199+ ts . zipWith ( tags , actualTags , ( expectedTag , actualTag ) => {
1200+ assert . equal ( expectedTag . name , actualTag . name ) ;
1201+ assert . equal ( expectedTag . text , actualTag . text , this . assertionMessageAtLastKnownMarker ( "signature help tag " + actualTag . name ) ) ;
1202+ } ) ;
1203+ }
1204+
11801205 public verifySignatureHelpCount ( expected : number ) {
11811206 const help = this . languageService . getSignatureHelpItems ( this . activeFile . fileName , this . currentCaretPosition ) ;
11821207 const actual = help && help . items ? help . items . length : 0 ;
@@ -3475,6 +3500,10 @@ namespace FourSlashInterface {
34753500 this . state . verifyCurrentSignatureHelpDocComment ( docComment ) ;
34763501 }
34773502
3503+ public currentSignatureHelpTagsAre ( tags : ts . JSDocTagInfo [ ] ) {
3504+ this . state . verifyCurrentSignatureHelpTags ( tags ) ;
3505+ }
3506+
34783507 public signatureHelpCountIs ( expected : number ) {
34793508 this . state . verifySignatureHelpCount ( expected ) ;
34803509 }
@@ -3603,8 +3632,8 @@ namespace FourSlashInterface {
36033632 this . state . verifyRangesWithSameTextAreDocumentHighlights ( ) ;
36043633 }
36053634
3606- public completionEntryDetailIs ( entryName : string , text : string , documentation ?: string , kind ?: string ) {
3607- this . state . verifyCompletionEntryDetails ( entryName , text , documentation , kind ) ;
3635+ public completionEntryDetailIs ( entryName : string , text : string , documentation ?: string , kind ?: string , tags ?: ts . JSDocTagInfo [ ] ) {
3636+ this . state . verifyCompletionEntryDetails ( entryName , text , documentation , kind , tags ) ;
36083637 }
36093638
36103639 /**
@@ -3634,8 +3663,8 @@ namespace FourSlashInterface {
36343663 }
36353664
36363665 public verifyQuickInfoDisplayParts ( kind : string , kindModifiers : string , textSpan : { start : number ; length : number ; } ,
3637- displayParts : ts . SymbolDisplayPart [ ] , documentation : ts . SymbolDisplayPart [ ] ) {
3638- this . state . verifyQuickInfoDisplayParts ( kind , kindModifiers , textSpan , displayParts , documentation ) ;
3666+ displayParts : ts . SymbolDisplayPart [ ] , documentation : ts . SymbolDisplayPart [ ] , tags : ts . JSDocTagInfo [ ] ) {
3667+ this . state . verifyQuickInfoDisplayParts ( kind , kindModifiers , textSpan , displayParts , documentation , tags ) ;
36393668 }
36403669
36413670 public getSyntacticDiagnostics ( expected : string ) {
0 commit comments