@@ -521,7 +521,8 @@ test('positionBy() supports multi-root documents', () => {
521521 }
522522 }
523523
524- equal ( a . positionBy ( { index : 0 } ) , { column : 8 , line : 1 , offset : 7 } ) // `offset` is present because the `0` index returns `source.start`
524+ // `offset` is present because the `0` index returns `source.start`
525+ equal ( a . positionBy ( { index : 0 } ) , { column : 8 , line : 1 , offset : 7 } )
525526 equal ( a . positionBy ( { index : 1 } ) , { column : 9 , line : 1 } )
526527 equal ( a . positionBy ( { word : 'a' } ) , { column : 8 , line : 1 } )
527528} )
@@ -542,9 +543,9 @@ test('rangeBy() returns range for word when offsets are missing', () => {
542543 let one = a . first as Declaration
543544
544545 // @ts -expect-error
545- if ( one . source ?. start ) delete one . source . start . offset ;
546+ if ( one . source ?. start ) delete one . source . start . offset
546547 // @ts -expect-error
547- if ( one . source ?. end ) delete one . source . end . offset ;
548+ if ( one . source ?. end ) delete one . source . end . offset
548549
549550 equal ( one . rangeBy ( { word : 'one' } ) , {
550551 end : { column : 9 , line : 1 } ,
@@ -586,13 +587,13 @@ test('rangeBy() returns range for word even after AST mutations when offsets are
586587 let two = one . next ( ) as Declaration
587588
588589 // @ts -expect-error
589- if ( a . source ?. start ) delete a . source . start . offset ;
590+ if ( a . source ?. start ) delete a . source . start . offset
590591 // @ts -expect-error
591- if ( a . source ?. end ) delete a . source . end . offset ;
592+ if ( a . source ?. end ) delete a . source . end . offset
592593 // @ts -expect-error
593- if ( two . source ?. start ) delete two . source . start . offset ;
594+ if ( two . source ?. start ) delete two . source . start . offset
594595 // @ts -expect-error
595- if ( two . source ?. end ) delete two . source . end . offset ;
596+ if ( two . source ?. end ) delete two . source . end . offset
596597
597598 equal ( a . rangeBy ( { word : 'two' } ) , {
598599 end : { column : 5 , line : 3 } ,
@@ -631,9 +632,9 @@ test('rangeBy() returns range for index and endIndex when offsets are missing',
631632 let one = a . first as Declaration
632633
633634 // @ts -expect-error
634- if ( one . source ?. start ) delete one . source . start . offset ;
635+ if ( one . source ?. start ) delete one . source . start . offset
635636 // @ts -expect-error
636- if ( one . source ?. end ) delete one . source . end . offset ;
637+ if ( one . source ?. end ) delete one . source . end . offset
637638
638639 equal ( one . rangeBy ( { endIndex : 3 , index : 1 } ) , {
639640 end : { column : 9 , line : 1 } ,
0 commit comments