@@ -916,7 +916,7 @@ namespace FourSlash {
916916 }
917917
918918 private getNode ( ) : ts . Node {
919- return ts . getTouchingPropertyName ( this . getSourceFile ( ) , this . currentCaretPosition ) ;
919+ return ts . getTouchingPropertyName ( this . getSourceFile ( ) , this . currentCaretPosition , /*includeJsDocComment*/ false ) ;
920920 }
921921
922922 private goToAndGetNode ( range : Range ) : ts . Node {
@@ -994,17 +994,15 @@ namespace FourSlash {
994994 }
995995
996996 public verifyReferenceGroups ( startRanges : Range | Range [ ] , parts : Array < { definition : string , ranges : Range [ ] } > ) : void {
997- interface ReferenceJson { definition : string ; ranges : ts . ReferenceEntry [ ] ; }
998- type ReferencesJson = ReferenceJson [ ] ;
999- const fullExpected = parts . map < ReferenceJson > ( ( { definition, ranges } ) => ( { definition, ranges : ranges . map ( rangeToReferenceEntry ) } ) ) ;
997+ const fullExpected = ts . map ( parts , ( { definition, ranges } ) => ( { definition, ranges : ranges . map ( rangeToReferenceEntry ) } ) ) ;
1000998
1001999 for ( const startRange of toArray ( startRanges ) ) {
10021000 this . goToRangeStart ( startRange ) ;
1003- const fullActual = ts . map < ts . ReferencedSymbol , ReferenceJson > ( this . findReferencesAtCaret ( ) , ( { definition, references } ) => ( {
1001+ const fullActual = ts . map ( this . findReferencesAtCaret ( ) , ( { definition, references } ) => ( {
10041002 definition : definition . displayParts . map ( d => d . text ) . join ( "" ) ,
10051003 ranges : references
10061004 } ) ) ;
1007- this . assertObjectsEqual < ReferencesJson > ( fullActual , fullExpected ) ;
1005+ this . assertObjectsEqual ( fullActual , fullExpected ) ;
10081006 }
10091007
10101008 function rangeToReferenceEntry ( r : Range ) : ts . ReferenceEntry {
@@ -1047,6 +1045,10 @@ namespace FourSlash {
10471045 this . raiseError ( `${ msgPrefix } At ${ path } : ${ msg } ` ) ;
10481046 } ;
10491047
1048+ if ( ( actual === undefined ) !== ( expected === undefined ) ) {
1049+ fail ( `Expected ${ expected } , got ${ actual } ` ) ;
1050+ }
1051+
10501052 for ( const key in actual ) if ( ts . hasProperty ( actual as any , key ) ) {
10511053 const ak = actual [ key ] , ek = expected [ key ] ;
10521054 if ( typeof ak === "object" && typeof ek === "object" ) {
0 commit comments