@@ -675,15 +675,15 @@ describe('TypescriptParser', () => {
675675
676676 expect ( parsed ) . toMatchSnapshot ( ) ;
677677 } ) ;
678-
678+
679679 it ( 'should parse a simple javascript file correctly with "parseFiles"' , async ( ) => {
680680 const parsed = await parser . parseFiles ( [ file ] , rootPath ) ;
681681 delete parsed [ 0 ] . filePath ;
682682 delete ( parsed [ 0 ] as any ) . rootPath ;
683683
684684 expect ( parsed ) . toMatchSnapshot ( ) ;
685685 } ) ;
686-
686+
687687 it ( 'should parse a simple javascript file correctly with "parseSource"' , async ( ) => {
688688 const content = readFileSync ( file ) . toString ( ) ;
689689 const parsed = await parser . parseSource ( content ) ;
@@ -704,15 +704,15 @@ describe('TypescriptParser', () => {
704704
705705 expect ( parsed ) . toMatchSnapshot ( ) ;
706706 } ) ;
707-
707+
708708 it ( 'should parse a simple javascript react file correctly with "parseFiles"' , async ( ) => {
709709 const parsed = await parser . parseFiles ( [ file ] , rootPath ) ;
710710 delete parsed [ 0 ] . filePath ;
711711 delete ( parsed [ 0 ] as any ) . rootPath ;
712712
713713 expect ( parsed ) . toMatchSnapshot ( ) ;
714714 } ) ;
715-
715+
716716 it ( 'should parse a simple javascript react file correctly with "parseSource"' , async ( ) => {
717717 const content = readFileSync ( file ) . toString ( ) ;
718718 const parsed = await parser . parseSource ( content ) ;
@@ -722,4 +722,17 @@ describe('TypescriptParser', () => {
722722
723723 } ) ;
724724
725+ describe ( 'Specific sources' , ( ) => {
726+
727+ it ( 'should parse generics in functions in classes correctly' , async ( ) => {
728+ const parsed = await parser . parseSource ( `export class TestClass {
729+ public test() {
730+ let a = <T>() => { let b = null; };
731+ }
732+ }` ) ;
733+ console . log ( parsed ) ;
734+ } ) ;
735+
736+ } ) ;
737+
725738} ) ;
0 commit comments